Page Speed Optimization Libraries
1.8.31.2
|
Composes two cache interfaces to form a two level http cache. More...
#include "write_through_http_cache.h"
Public Member Functions | |
WriteThroughHTTPCache (CacheInterface *cache1, CacheInterface *cache2, Timer *timer, Hasher *hasher, Statistics *statistics) | |
Takes ownership of both caches passed in. | |
virtual void | SetIgnoreFailurePuts () |
Implements HTTPCache::SetIgnoreFailurePuts(). | |
virtual void | Find (const GoogleString &key, const GoogleString &fragment, MessageHandler *handler, Callback *callback) |
Implements HTTPCache::Find(). | |
virtual void | Delete (const GoogleString &key, const GoogleString &fragment) |
Implements HTTPCache::Delete(). | |
virtual void | set_force_caching (bool force) |
Implements HTTPCache::set_force_caching(). | |
virtual void | set_hasher (Hasher *hasher) |
Implements HttpCache::set_hasher(). | |
virtual void | set_disable_html_caching_on_https (bool x) |
Implements HTTPCache::set_disable_html_caching_on_https(). | |
virtual void | set_remember_not_cacheable_ttl_seconds (int64 value) |
Implements HTTPCache::set_remember_not_cacheable_ttl_seconds(). | |
virtual void | set_remember_fetch_failed_ttl_seconds (int64 value) |
Implements HTTPCache::set_remember_fetch_failed_ttl_seconds(). | |
virtual void | set_remember_fetch_dropped_ttl_seconds (int64 value) |
Implements HTTPCache::set_remember_fetch_dropped_ttl_seconds();. | |
virtual void | set_max_cacheable_response_content_length (int64 value) |
Implements HTTPCache::set_max_cacheable_response_content_length(). | |
virtual void | RememberNotCacheable (const GoogleString &key, const GoogleString &fragment, bool is_200_status_code, MessageHandler *handler) |
Implements HTTPCache::RememberNotCacheable(). | |
virtual void | RememberFetchFailed (const GoogleString &key, const GoogleString &fragment, MessageHandler *handler) |
Implements HTTPCache::RememberFetchFailed(). | |
virtual void | RememberFetchDropped (const GoogleString &key, const GoogleString &fragment, MessageHandler *handler) |
Implements HTTPCache::RememberFetchDropped(). | |
void | set_cache1_limit (size_t limit) |
size_t | cache1_limit () const |
virtual GoogleString | Name () const |
Static Public Member Functions | |
static GoogleString | FormatName (StringPiece l1, StringPiece l2) |
Static Public Attributes | |
static const size_t | kUnlimited |
Protected Member Functions | |
virtual void | PutInternal (const GoogleString &key, const GoogleString &fragment, int64 start_us, HTTPValue *value) |
Implements HTTPCache::PutInternal(). |
Composes two cache interfaces to form a two level http cache.
void net_instaweb::WriteThroughHTTPCache::set_cache1_limit | ( | size_t | limit | ) | [inline] |
By default, all data goes into both cache1 and cache2. But if you only want to put small items in cache1, you can set the size limit. Note that both the key and value will count torward the size.