bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
|
#include <EffectiveUrlCache.h>
Public Member Functions | |
void | dump (std::ostream &strm) const override |
dumps information about this object | |
EffectiveUrlCache (const EffectiveUrlCache &src)=delete | |
std::shared_ptr< EffectiveUrl > | get_effective_url (std::shared_ptr< url > source_url) |
EffectiveUrlCache & | operator= (const EffectiveUrlCache &rhs)=delete |
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 53 of file EffectiveUrlCache.h.
|
overridevirtual |
dumps information about this object
strm | C++ i/o stream to dump the information to |
Implements BESObj.
Definition at line 192 of file EffectiveUrlCache.cc.
shared_ptr< 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 75 of file EffectiveUrlCache.cc.
|
inlinestatic |
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 return a pointer to that instance.
Thread safe with C++-11 and greater.
Definition at line 85 of file EffectiveUrlCache.h.
|
friend |
Definition at line 72 of file EffectiveUrlCache.h.