View Source http_cache_store_process (http_cache v0.3.1)

An in-process implementation of http_cache_store

This implementation is used in this library's test and can be used in your own tests. It stores data in the current process, and thus provides isolation. It cannot, of course, be used in real-life because data is discarded as soon as the process dies, and no cleanup ever happens.

The save_in_file/0 function can be used to simulate a store that saves responses on the disk. It saves the responses to files in tmp and therefore cannot be used on non-UNIX systems.

Link to this section Summary

Link to this section Functions

Link to this function

get_response(RespRef, Opts)

View Source
Link to this function

invalidate_by_alternate_key(Searched, Opts)

View Source
Link to this function

invalidate_url(SearchedUrlDigest, Opts)

View Source
Link to this function

list_candidates(ReqKey, Opts)

View Source
Link to this function

notify_response_used(RespRef, Opts)

View Source
Link to this function

put(ReqKey, UrlDigest, VaryHeaders, _, RespMetadata, Opts)

View Source

Saves response into a file

When called before saving, it instructs this implementation to store the response in a file in /tmp. Not thaat it works only on UNIX systems.