Detailed Description

A particular cached file.

Public Member Functions

 CachedContent (CachedContentSet set, string path)
 
 CachedContent (CachedContentSet set, string path, JSObject obj)
 
void Write (byte[] data)
 Writes the given data to the file. More...
 
void Save ()
 Writes out this index entry. More...
 
void SetExpiry (string value)
 Sets an expiry time. More...
 
void LoadFromJson (JSObject obj)
 Loads this data from a JSON object. More...
 
JSObject ToJson ()
 Gets this data as a suitable JSON object. More...
 

Public Attributes

string Path
 The relative path. More...
 
bool Changed
 True if this requires saving. More...
 
CachedContentSet Set
 The set this belongs to. More...
 

Static Public Attributes

static int Counter =1
 A counter for this session. More...
 

Properties

bool HasExpiry [get]
 True if an expiry date was set (if in use, we don't bother with a check for a 304). More...
 
string ETag [get, set]
 The etag. More...
 
DateTime Expiry [get, set]
 The expiry of this entry (UTC datetime). More...
 
DateTime SavedAt [get, set]
 The time it was saved at. More...
 
string PathToData [get, set]
 Cached path. More...
 
bool Expired [get]
 Has this cookie expired? More...
 
byte[] Data [get]
 The cached data. More...
 

Private Attributes

bool HasExpiry_
 True if an expiry date was set (if in use, we don't bother with a check for a 304). More...
 
string ETag_
 The etag. More...
 
DateTime Expiry_
 The expiry of this entry (UTC datetime). More...
 
DateTime SavedAt_
 The time it was saved at. More...
 
string PathToData_
 Cached path. More...
 

Constructor & Destructor Documentation

PowerUI.CachedContent.CachedContent ( CachedContentSet  set,
string  path 
)
inline
PowerUI.CachedContent.CachedContent ( CachedContentSet  set,
string  path,
JSObject  obj 
)
inline

Member Function Documentation

void PowerUI.CachedContent.LoadFromJson ( JSObject  obj)
inline

Loads this data from a JSON object.

void PowerUI.CachedContent.Save ( )
inline

Writes out this index entry.

void PowerUI.CachedContent.SetExpiry ( string  value)
inline

Sets an expiry time.

JSObject PowerUI.CachedContent.ToJson ( )
inline

Gets this data as a suitable JSON object.

void PowerUI.CachedContent.Write ( byte[]  data)
inline

Writes the given data to the file.

Member Data Documentation

bool PowerUI.CachedContent.Changed

True if this requires saving.

int PowerUI.CachedContent.Counter =1
static

A counter for this session.

string PowerUI.CachedContent.ETag_
private

The etag.

DateTime PowerUI.CachedContent.Expiry_
private

The expiry of this entry (UTC datetime).

bool PowerUI.CachedContent.HasExpiry_
private

True if an expiry date was set (if in use, we don't bother with a check for a 304).

string PowerUI.CachedContent.Path

The relative path.

string PowerUI.CachedContent.PathToData_
private

Cached path.

DateTime PowerUI.CachedContent.SavedAt_
private

The time it was saved at.

CachedContentSet PowerUI.CachedContent.Set

The set this belongs to.

Property Documentation

byte [] PowerUI.CachedContent.Data
get

The cached data.

string PowerUI.CachedContent.ETag
getset

The etag.

bool PowerUI.CachedContent.Expired
get

Has this cookie expired?

DateTime PowerUI.CachedContent.Expiry
getset

The expiry of this entry (UTC datetime).

bool PowerUI.CachedContent.HasExpiry
get

True if an expiry date was set (if in use, we don't bother with a check for a 304).

string PowerUI.CachedContent.PathToData
getset

Cached path.

DateTime PowerUI.CachedContent.SavedAt
getset

The time it was saved at.