Empeld
Empeld plugin documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
pluginbase.Dependencies.ICacheProvider Interface Reference

Per-system cache provider. Specific to the plugin More...

Public Member Functions

bool Exists (string slug)
 Check if the cache item with the specific slug exists More...
 
Stream OpenRead (string slug)
 Open a cache item for reading. Will throw exception if not found Will decompress automatically if compression was enabled More...
 
Stream OpenWrite (string slug, bool truncate=true, bool compress=false)
 Open a cache item for writing Will overwrite any existing data More...
 
void Write< T > (string slug, T obj)
 Write an object of type T to a cache object More...
 
Read< T > (string slug)
 Read the specified slug. Will return default(T) if it doesn't exist More...
 
Read< T > (string slug, T def)
 Read the specified slug. Will return def/// More...
 
void Delete (string slug)
 Delete the cache item with the slug More...
 

Detailed Description

Per-system cache provider. Specific to the plugin

Attribute: Injectable

Member Function Documentation

void pluginbase.Dependencies.ICacheProvider.Delete ( string  slug)

Delete the cache item with the slug

Parameters
slugSlug.
bool pluginbase.Dependencies.ICacheProvider.Exists ( string  slug)

Check if the cache item with the specific slug exists

Parameters
slugSlug.
Stream pluginbase.Dependencies.ICacheProvider.OpenRead ( string  slug)

Open a cache item for reading. Will throw exception if not found Will decompress automatically if compression was enabled

Returns
The stream.
Parameters
slugSlug.
Stream pluginbase.Dependencies.ICacheProvider.OpenWrite ( string  slug,
bool  truncate = true,
bool  compress = false 
)

Open a cache item for writing Will overwrite any existing data

Returns
The stream.
Parameters
slugSlug.
truncateTruncate any existing file
compressIf true, will use gzip compression. Truncate must also be true.
T pluginbase.Dependencies.ICacheProvider.Read< T > ( string  slug)

Read the specified slug. Will return default(T) if it doesn't exist

Parameters
slugSlug.
Template Parameters
TThe type of the cache object.
T pluginbase.Dependencies.ICacheProvider.Read< T > ( string  slug,
def 
)

Read the specified slug. Will return def///

Attribute: ault

if it doesn't exist.

Parameters
slugSlug.
defDef.
Template Parameters
TThe type of the cache.
void pluginbase.Dependencies.ICacheProvider.Write< T > ( string  slug,
obj 
)

Write an object of type T to a cache object

Parameters
slugSlug.
objObject.
Template Parameters
TObject type

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