bes Updated for version 3.20.13
|
#include <EffectiveUrlCache.h>
Public Member Functions | |
virtual std::string | dump () const |
dumps information about this object | |
void | dump (std::ostream &strm) const override |
dumps information about this object | |
std::shared_ptr< EffectiveUrl > | get_effective_url (std::shared_ptr< url > source_url) |
Static Public Member Functions | |
static EffectiveUrlCache * | TheCache () |
Get the singleton EffectiveUrlCache instance. | |
Friends | |
class | EffectiveUrlCacheTest |
This is a singleton class. It is used to associate a URL with its "effective" URL. This means that when a URL is dereferenced the request may go through a potentially large number of redirect actions before the requested resource is retrieved. This final location, from which the requested bytes are transmitted, is termed the "effective url" and that is stored in an in memory cache (std::map) so that later requests may skip the redirects and just get required bytes from the actual source.
Definition at line 50 of file EffectiveUrlCache.h.
|
virtual |
dumps information about this object
Displays the pointer value of this instance along with the catalogs registered in this list.
strm | C++ i/o stream to dump the information to |
Definition at line 151 of file EffectiveUrlCache.cc.
|
overridevirtual |
dumps information about this object
Displays the pointer value of this instance along with the catalogs registered in this list.
strm | C++ i/o stream to dump the information to |
Implements BESObj.
Definition at line 123 of file EffectiveUrlCache.cc.
shared_ptr< http::EffectiveUrl > http::EffectiveUrlCache::get_effective_url | ( | std::shared_ptr< url > | source_url | ) |
Find the terminal (effective) url for the source_url. If the source_url matches the skip_regex then it will not be cached.
source_url |
Definition at line 185 of file EffectiveUrlCache.cc.
|
static |
Get the singleton EffectiveUrlCache instance.
This static method returns the instance of this singleton class. The implementation will only build one instance of EffectiveUrlCache and thereafter simple return that pointer.
Definition at line 70 of file EffectiveUrlCache.cc.
|
friend |
Definition at line 73 of file EffectiveUrlCache.h.