Page Speed Optimization Libraries  1.2.24.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Friends
net_instaweb::CacheExtender Class Reference

#include "cache_extender.h"

Inheritance diagram for net_instaweb::CacheExtender:
net_instaweb::RewriteFilter net_instaweb::CommonFilter net_instaweb::EmptyHtmlFilter net_instaweb::HtmlFilter

List of all members.

Public Member Functions

 CacheExtender (RewriteDriver *driver)
virtual void StartDocumentImpl ()
virtual void StartElementImpl (HtmlElement *element)
virtual void EndElementImpl (HtmlElement *element)
virtual const char * Name () const
 The name of this filter -- used for logging and debugging.
virtual const char * id () const
RewriteContextMakeNestedContext (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 RewriteContextMakeRewriteContext ()

Friends

class Context

Detailed Description

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.

Todo:
TODO(jmarantz): rename this class to something more generic, like RenameUrlFilter or ProxyUrlFilter.

Member Function Documentation

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.

Creates a nested rewrite for given parent and slot, and returns it. The result is not registered with the parent.

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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines