19 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_CACHE_EXTENDER_H_
20 #define NET_INSTAWEB_REWRITER_PUBLIC_CACHE_EXTENDER_H_
31 namespace net_instaweb {
35 class ResponseHeaders;
51 static const char kCacheExtensions[];
52 static const char kNotCacheable[];
60 virtual void StartElementImpl(
HtmlElement* element);
61 virtual void EndElementImpl(
HtmlElement* element) {}
63 virtual const char*
Name()
const {
return "CacheExtender"; }
64 virtual const char* id()
const {
return RewriteOptions::kCacheExtenderId; }
69 const ResourceSlotPtr& slot);
79 RewriteResult RewriteLoadedResource(
const ResourcePtr& input_resource,
80 const OutputResourcePtr& output_resource,
81 CachedResult* result);
83 bool ShouldRewriteResource(
84 const ResponseHeaders* headers, int64 now_ms,
85 const ResourcePtr& input_resource,
const StringPiece& url,
86 CachedResult* result)
const;
88 Variable* extension_count_;
89 Variable* not_cacheable_count_;
Base class for implementations of monitoring statistics.
Definition: statistics.h:342
RewriteContext * MakeNestedContext(RewriteContext *parent, const ResourceSlotPtr &slot)
virtual void StartDocumentImpl()
Definition: cache_extender.h:59
Definition: html_element.h:42
virtual const char * Name() const
The name of this filter – used for logging and debugging.
Definition: cache_extender.h:63
Definition: rewrite_filter.h:35
Definition: rewrite_driver.h:100
RewriteResult
Definition: rewrite_result.h:27
virtual RewriteContext * MakeRewriteContext()
virtual bool ComputeOnTheFly() const
Definition: cache_extender.h:49