#include "rewrite_driver.h"
Public Member Functions | |
virtual bool | IsCacheValid (const ResponseHeaders &headers) |
Protected Member Functions | |
OptionsAwareHTTPCacheCallback (const RewriteOptions *rewrite_options) |
Subclass of HTTPCache::Callback that incorporates a given RewriteOptions' invalidation policy.
virtual bool net_instaweb::OptionsAwareHTTPCacheCallback::IsCacheValid | ( | const ResponseHeaders & | headers | ) | [virtual] |
A method that allows client Callbacks to apply invalidation checks. We first (in http_cache.cc) check whether the entry is expired using normal http semantics, and if it is not expired, then this check is called -- thus callbacks can apply any further invalidation semantics it wants on otherwise valid entries. But there's no way for a callback to override when the HTTP semantics say the entry is expired.
See also OptionsAwareHTTPCacheCallback in rewrite_driver.h for an implementation you probably want to use.
Implements net_instaweb::HTTPCache::Callback.