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>
CYINetworkConfiguration::CYINetworkConfiguration |
( |
| ) |
|
virtual CYINetworkConfiguration::~CYINetworkConfiguration |
( |
| ) |
|
|
virtual |
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 |
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: