Page Speed Optimization Libraries
1.7.30.1
|
#include "cache_extender.h"
Public Member Functions | |
CacheExtender (RewriteDriver *driver) | |
virtual void | StartDocumentImpl () |
virtual void | StartElementImpl (HtmlElement *element) |
virtual void | EndElementImpl (HtmlElement *element) |
virtual const char * | Name () const |
virtual const char * | id () const |
RewriteContext * | MakeNestedContext (RewriteContext *parent, const ResourceSlotPtr &slot) |
Static Public Member Functions | |
static void | InitStats (Statistics *statistics) |
Static Public Attributes | |
static const char | kCacheExtensions [] |
static const char | kNotCacheable [] |
Protected Member Functions | |
virtual bool | ComputeOnTheFly () const |
virtual RewriteContext * | MakeRewriteContext () |
Friends | |
class | Context |
Rewrites resources without changing their content -- just their URLs and headers. The original intent of this filter was limited to cache extension. However, its scope has been expanded to include domain sharding and moving static resources to cookieless domains or CDNs.
virtual bool net_instaweb::CacheExtender::ComputeOnTheFly | ( | ) | const [protected, virtual] |
If this method returns true, the data output of this filter will not be cached, and will instead be recomputed on the fly every time it is needed. (However, the transformed URL and similar metadata in CachedResult will be kept in cache).
The default implementation returns false.
Reimplemented from net_instaweb::RewriteFilter.
RewriteContext* net_instaweb::CacheExtender::MakeNestedContext | ( | RewriteContext * | parent, |
const ResourceSlotPtr & | slot | ||
) |
Creates a nested rewrite for given parent and slot, and returns it. The result is not registered with the parent.
virtual RewriteContext* net_instaweb::CacheExtender::MakeRewriteContext | ( | ) | [protected, virtual] |
Generates a RewriteContext appropriate for this filter. Default implementation returns NULL. This must be overridden by filters. This is used to implement Fetch.
Reimplemented from net_instaweb::RewriteFilter.
virtual void net_instaweb::CacheExtender::StartDocumentImpl | ( | ) | [inline, virtual] |
Overload these implementer methods: Intentionally left abstract so that implementers don't forget to change the name from Blah to BlahImpl.
Implements net_instaweb::CommonFilter.