Page Speed Optimization Libraries
1.8.31.3
|
Public Member Functions | |
Context (const RewriterPtr &rewriter, RewriteDriver *driver, RewriteContext *parent) | |
virtual void | RewriteSingle (const ResourcePtr &input, const OutputResourcePtr &output) |
Subclasses of SingleRewriteContext must override this: | |
Protected Member Functions | |
virtual const char * | id () const |
Returns the filter ID. | |
virtual OutputResourceKind | kind () const |
virtual bool | OptimizationOnly () const |
virtual OutputResourceKind net_instaweb::SimpleTextFilter::Context::kind | ( | ) | const [inline, protected, 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.
virtual bool net_instaweb::SimpleTextFilter::Context::OptimizationOnly | ( | ) | const [inline, protected, virtual] |
If this returns true, running the rewriter isn't required for correctness of the page, so the engine will be permitted to drop the rewrite if needed to preserve system responsiveness.
Reimplemented from net_instaweb::RewriteContext.