bes Updated for version 3.20.13
http::EffectiveUrlCache Class Reference

#include <EffectiveUrlCache.h>

Collaboration diagram for http::EffectiveUrlCache:
Collaboration graph

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< EffectiveUrlget_effective_url (std::shared_ptr< url > source_url)
 

Static Public Member Functions

static EffectiveUrlCacheTheCache ()
 Get the singleton EffectiveUrlCache instance.
 

Friends

class EffectiveUrlCacheTest
 

Detailed Description

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.

Member Function Documentation

◆ dump() [1/2]

string http::EffectiveUrlCache::dump ( ) const
virtual

dumps information about this object

Displays the pointer value of this instance along with the catalogs registered in this list.

Parameters
strmC++ i/o stream to dump the information to

Definition at line 151 of file EffectiveUrlCache.cc.

◆ dump() [2/2]

void http::EffectiveUrlCache::dump ( std::ostream &  strm) const
overridevirtual

dumps information about this object

Displays the pointer value of this instance along with the catalogs registered in this list.

Parameters
strmC++ i/o stream to dump the information to

Implements BESObj.

Definition at line 123 of file EffectiveUrlCache.cc.

◆ get_effective_url()

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.

Parameters
source_url
Returns
The effective URL

Definition at line 185 of file EffectiveUrlCache.cc.

◆ TheCache()

EffectiveUrlCache * http::EffectiveUrlCache::TheCache ( )
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.

Returns
A pointer to the EffectiveUrlCache singleton

Definition at line 70 of file EffectiveUrlCache.cc.

Friends And Related Function Documentation

◆ EffectiveUrlCacheTest

friend class EffectiveUrlCacheTest
friend

Definition at line 73 of file EffectiveUrlCache.h.


The documentation for this class was generated from the following files: