ImageResizer  3.4.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Static Public Member Functions | List of all members
ImageResizer.Plugins.PsdComposer.MemCachedFile Class Reference

Caches a file in memory using the asp.net Cache object, while exposing methods for adding subkeys that invalidate along with the file if the source file is changed. More...

Public Member Functions

object GetSubkey (string subkey)
 Remember, the object returned here may be accessed by multiple threads at the same time! No modifications! More...
 
void SetSubkey (string subkey, object item)
 
Stream GetStream ()
 Wraps the byte array in a read-only stream More...
 

Static Public Member Functions

static MemCachedFile GetCachedVirtualFile (string path, IVirtualImageProvider provider, NameValueCollection queryString)
 

Detailed Description

Caches a file in memory using the asp.net Cache object, while exposing methods for adding subkeys that invalidate along with the file if the source file is changed.

Definition at line 18 of file MemCachedFile.cs.

Member Function Documentation

Stream ImageResizer.Plugins.PsdComposer.MemCachedFile.GetStream ( )
inline

Wraps the byte array in a read-only stream

Returns

Definition at line 52 of file MemCachedFile.cs.

53  {
54  return new MemoryStream(data,false);
55  }
object ImageResizer.Plugins.PsdComposer.MemCachedFile.GetSubkey ( string  subkey)
inline

Remember, the object returned here may be accessed by multiple threads at the same time! No modifications!

Parameters
subkey
Returns

Definition at line 31 of file MemCachedFile.cs.

32  {
33  lock (subkey_syncobj)
34  {
35  if (!subkeys.ContainsKey(subkey)) return null;
36  return subkeys[subkey];
37  }
38  }

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