You.i Engine
CYINetworkConfiguration Class Reference

Detailed Description

CYINetworkConfiguration is a data structure that describes the properties of the You.i Engine network components.

Default values: Response cache size: 7 * 1024 * 1024 bytes Persistent cache size: 50 * 1024 * 1024 bytes

#include <network/YiNetworkConfiguration.h>

Inheritance diagram for CYINetworkConfiguration:

Public Member Functions

 CYINetworkConfiguration ()
 
virtual ~CYINetworkConfiguration ()
 
void SetResponseCacheSize (size_t bytes)
 
void SetPersistentCacheSize (size_t bytes)
 
void SetHeuristicCacheExpirationEnabled (bool enable)
 
size_t GetResponseCacheSize () const
 
size_t GetPersistentCacheSize () const
 
CYIString GetPersistentCachePath () const
 
bool IsHeuristicCacheExpirationEnabled () const
 
void SetEnableCookieHandling (bool enableCookieHandling)
 
bool IsCookieHandlingEnabled () const
 

Constructor & Destructor Documentation

CYINetworkConfiguration::CYINetworkConfiguration ( )
virtual CYINetworkConfiguration::~CYINetworkConfiguration ( )
virtual

Member Function Documentation

CYIString CYINetworkConfiguration::GetPersistentCachePath ( ) const

Returns the path used by the persistent cache. This is a folder named 'NetworkPersistentCache' under the application's cache path.

See also
CYIApp::GetCachePath()
size_t CYINetworkConfiguration::GetPersistentCacheSize ( ) const

The size in bytes of the file persistent cache. Default is 50 * 1024 * 1024

size_t CYINetworkConfiguration::GetResponseCacheSize ( ) const

The size in bytes of the HTTP response cache. Default is 7 * 1024 * 1024

bool CYINetworkConfiguration::IsCookieHandlingEnabled ( ) const

Returns true if cookie handling is enabled. Cookies are saved in the cookie store and included in subsequent requests automatically if cookie handling is enabled.

bool CYINetworkConfiguration::IsHeuristicCacheExpirationEnabled ( ) const

Returns true if heuristic expiration is enabled. Default is enabled.

See also
SetHeuristicCacheExpirationEnabled(bool)
void CYINetworkConfiguration::SetEnableCookieHandling ( bool  enableCookieHandling)
void CYINetworkConfiguration::SetHeuristicCacheExpirationEnabled ( bool  enable)

Enables heuristic expiration for caches. This allows caching of responses that don't contain the 'Cache-Control' or 'Expires' header fields. In the case where these fields don't exist, we use the 'Last-Modified' and 'Date' header fields to determine heuristic freshness. If either of these headers are missing, the reponse will not be cached.

This is enabled by default.

void CYINetworkConfiguration::SetPersistentCacheSize ( size_t  bytes)

The size in bytes of the file persistent cache. Using the HTTP request URLs as keys, the cache will store up to bytes of downloaded file information for quick retrieval. Requests for which responses have been cached will not cause any network traffic to occur. Default is 50 * 1024 * 1024

void CYINetworkConfiguration::SetResponseCacheSize ( size_t  bytes)

The size in bytes of the HTTP response cache. Using the HTTP request URLs as keys, the cache will store up to bytes of HTTP response information for quick retrieval. Requests for which responses have been cached will not cause any network traffic to occur. Default is 7 * 1024 * 1024


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