|
Page Speed Optimization Libraries
1.13.35.1
|
#include "http_value_writer.h"
Public Member Functions | |
| HTTPValueWriter (HTTPValue *value, HTTPCache *cache) | |
| void | SetHeaders (ResponseHeaders *headers) |
| bool | Write (const StringPiece &str, MessageHandler *handler) |
| bool | has_buffered () const |
| bool | CheckCanCacheElseClear (ResponseHeaders *headers) |
| bool | CanCacheContent (const StringPiece &str) const |
Wrappper for buffering an HTTPValue. HTTPValueWriter ensures that an HTTPValue which cannot be eventually cached is not buffered.
| bool net_instaweb::HTTPValueWriter::CanCacheContent | ( | const StringPiece & | str | ) | const |
Checks if we can write the string to the HttpValue without going over limits.
| bool net_instaweb::HTTPValueWriter::CheckCanCacheElseClear | ( | ResponseHeaders * | headers | ) |
Checks if the http_value should be buffered or not depending on whether we can eventually cache it. It also clears the http_value if it can not be buffered. Note that this only checks the size constraints, not cache headers.
1.8.6