Page Speed Optimization Libraries
1.7.30.1
|
Public Member Functions | |
Context (FakeFilter *filter, RewriteDriver *driver, RewriteContext *parent, ResourceContext *resource_context) | |
void | RewriteSingle (const ResourcePtr &input, const OutputResourcePtr &output) |
Subclasses of SingleRewriteContext must override this: | |
void | DoRewriteSingle (const ResourcePtr input, OutputResourcePtr output) |
GoogleString | UserAgentCacheKey (const ResourceContext *resource_context) const |
virtual const char * | id () const |
Returns the filter ID. | |
virtual OutputResourceKind | kind () const |
virtual OutputResourceKind net_instaweb::FakeFilter::Context::kind | ( | ) | const [inline, virtual] |
Rewrites come in three flavors, as described in output_resource_kind.h, so this method must be defined by subclasses to indicate which it is.
For example, we will avoid caching output_resource content in the HTTP cache for rewrites that are so quick to complete that it's fine to do the rewrite on every request. extend_cache is obviously in this category, and it's arguable we could treat js minification that way too (though we don't at the moment).
Implements net_instaweb::RewriteContext.
GoogleString net_instaweb::FakeFilter::Context::UserAgentCacheKey | ( | const ResourceContext * | context | ) | const [virtual] |
Indicates user agent capabilities that must be stored in the cache key.
Note that the context may be NULL as it may not be set before this. Since it isn't going to be modified in the method, ResourceContext is passed as a const pointer.
Reimplemented from net_instaweb::RewriteContext.