org.apache.shindig.gadgets.http
Interface InvalidationService

All Known Implementing Classes:
DefaultInvalidationService, NoOpInvalidationService

public interface InvalidationService

Service implemented by the container to support content invalidation.


Field Summary
static String INVALIDATION_HEADER
          Header used to tag the content with its invalidation marker.
 
Method Summary
 void invalidateApplicationResources(Set<Uri> uris, SecurityToken token)
          Invalidate a set of cached resources that are part of the application specification itself.
 void invalidateUserResources(Set<String> opensocialIds, SecurityToken token)
          Invalidate all cached resources where the specified user ids were used as either the owner or viewer id when a signed or OAuth request was made for the content by the application identified in the security token.
 boolean isValid(HttpRequest request, HttpResponse response)
          Is the specified HttpResponse still valid.
 HttpResponse markResponse(HttpRequest request, HttpResponse response)
          Mark the HttpResponse prior to caching it so that subsequent calls to isValid can detect if it has been invalidated.
 

Field Detail

INVALIDATION_HEADER

static final String INVALIDATION_HEADER
Header used to tag the content with its invalidation marker. Suppressed on output

See Also:
Constant Field Values
Method Detail

invalidateApplicationResources

void invalidateApplicationResources(Set<Uri> uris,
                                    SecurityToken token)
Invalidate a set of cached resources that are part of the application specification itself. This includes gadget specs, manifests and message bundles

Parameters:
uris - of content to invalidate
token - identifying the calling application

invalidateUserResources

void invalidateUserResources(Set<String> opensocialIds,
                             SecurityToken token)
Invalidate all cached resources where the specified user ids were used as either the owner or viewer id when a signed or OAuth request was made for the content by the application identified in the security token.

Parameters:
opensocialIds - Set of user ids to invalidate authenticated/signed content for
token - identifying the calling application

isValid

boolean isValid(HttpRequest request,
                HttpResponse response)
Is the specified HttpResponse still valid. If the request is signed or authenticated has its content been invalidated by a call to invalidateUserResource subsequent to the response being cached.


markResponse

HttpResponse markResponse(HttpRequest request,
                          HttpResponse response)
Mark the HttpResponse prior to caching it so that subsequent calls to isValid can detect if it has been invalidated.



Copyright © 2007-2012. All Rights Reserved.