|
Rose
|
A cache source on the World Wide Web. More...
#include <Cache.h>


Public Member Functions | |
| CacheWebSource (std::string sourceURI) | |
| Constructor. More... | |
| CacheWebSource (std::string sourceURI, std::chrono::system_clock::duration cacheValidityDuration) | |
| Constructor. More... | |
| void | fetch (CacheObject &cacheObject, std::ostream &ostrm, time_t cacheTime) override |
| Fetch a source object. More... | |
| long | responseCode () const |
| Get the response code returned by the server. More... | |
| const std::string & | sourceURI () const |
Public Member Functions inherited from rose::CacheSource | |
| auto | cacheValidDuration () const |
| Access the cache object validity period. More... | |
Protected Attributes | |
| std::string | mSourceURI |
| The URI for the source. | |
| long | mResponseCode {0} |
| The returned response code. | |
Protected Attributes inherited from rose::CacheSource | |
| std::chrono::system_clock::duration | mCacheValidDuration {} |
A cache source on the World Wide Web.
|
explicit |
Constructor.
The sourceURI will be prepended to the CacheObject source name to create the CacheObject source URI. The default cache validity period is 1 hour on the system clock.
| sourceURI | The source URI. |
| rose::CacheWebSource::CacheWebSource | ( | std::string | sourceURI, |
| std::chrono::system_clock::duration | cacheValidityDuration | ||
| ) |
Constructor.
The sourceURI will be prepended to the CacheObject source name to create the CacheObject source URI. The cache validity period is set to the value specified in cacheValidityDuration.
| sourceURI | The source URI. |
| cacheValidityDuration | The duration that a cache object is considered valid. |
|
overridevirtual |
Fetch a source object.
| cacheObject | The object to fetch. |
| ostrm | An output stream to write the object to. |
| cacheTime | The time for the object currently in cache. |
Implements rose::CacheSource.
|
inline |
Get the response code returned by the server.
1.8.13