ImageResizer  3.4.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
List of all members
ImageResizer.Plugins.DiskCache.CacheIndex Class Reference

Provides thread-safe access to the index of the disk cache More...

Inheritance diagram for ImageResizer.Plugins.DiskCache.CacheIndex:
Inheritance graph
[legend]
Collaboration diagram for ImageResizer.Plugins.DiskCache.CacheIndex:
Collaboration graph
[legend]

Additional Inherited Members

- Public Member Functions inherited from ImageResizer.Plugins.DiskCache.CachedFolder
virtual void clear ()
 
virtual CachedFileInfo getCachedFileInfo (string relativePath)
 Returns null if (a) the file doesn't exist, or (b) the file isn't populated. Calling code should always fall back to filesystem calls on a null result. More...
 
virtual void setCachedFileInfo (string relativePath, CachedFileInfo info)
 Sets the CachedFileInfo object for the specified path, creating any needed folders along the way. If 'null', the item will be removed, and no missing folder will be created. More...
 
bool bumpDateIfExists (string relativePath)
 Tries to set the AccessedUtc of the specified file to the current date (just in memory, not on the filesystem). More...
 
virtual CachedFileInfo getFileInfo (string relativePath, string physicalPath)
 Gets a CachedFileInfo object for the file even if it isn't in the cache (falls back to the filesystem) More...
 
virtual CachedFileInfo getFileInfoCertainExists (string relativePath, string physicalPath)
 Verifies the file exists before returning the cached data. Discrepancies in file existence result in OnFileDisappeard being fired. More...
 
bool GetIsValid (string relativePath)
 Returns the value of IsValid on the specified folder if present, or 'false' if not present. More...
 
IList< string > getSubfolders (string relativePath)
 returns a list More...
 
Dictionary< string,
CachedFileInfo
getSubfilesCopy (string relativePath)
 returns a dictionary of files. More...
 
ICollection< KeyValuePair
< string, CachedFileInfo > > 
getSortedSubfiles (string relativePath)
 returns a dictionary of files. More...
 
int getFileCount (string relativePath)
 
void populate (string relativePath, string physicalPath)
 Refreshes file and folder listing for this folder (non-recursive). Sets IsValid=true afterwards. More...
 
bool existsCertain (string relativePath, string physicalPath)
 
bool exists (string relativePath, string physicalPath)
 
bool modifiedDateMatches (DateTime utc, string relativePath, string physicalPath)
 
bool modifiedDateMatchesCertainExists (DateTime utc, string relativePath, string physicalPath)
 
- Protected Member Functions inherited from ImageResizer.Plugins.DiskCache.CachedFolder
CachedFolder getFolder (string relativePath)
 Not thread safe. More...
 
CachedFolder getOrCreateFolder (string relativePath, bool createIfMissing)
 
void populateSubfolders (string relativePath, string physicalPath)
 Updates the 'folders' dictionary to match the folders that exist on disk. ONLY UPDATES THE LOCAL FOLDER More...
 
void populateFiles (string relativePath, string physicalPath)
 Updates the 'files' dictionary to match the files that exist on disk. Uses the accessedUtc values from the previous dictionary if they are newer. More...
 
bool roughCompare (DateTime d1, DateTime d2)
 Returns true if both dates are equal to the nearest 200th of a second. More...
 
string checkRelativePath (string relativePath)
 
- Protected Attributes inherited from ImageResizer.Plugins.DiskCache.CachedFolder
readonly object _sync = new object()
 
Dictionary< string, CachedFolderfolders = new Dictionary<string, CachedFolder>(StringComparer.OrdinalIgnoreCase)
 
Dictionary< string,
CachedFileInfo
files = new Dictionary<string, CachedFileInfo>(StringComparer.OrdinalIgnoreCase)
 
- Properties inherited from ImageResizer.Plugins.DiskCache.CachedFolder
bool IsValid [get, set]
 Defaults to false. Set to true immediately after being refreshed from the filesystem. Set to false if a file disappears from the filesystem cache without the cache index being notified first. Used by the cleanup system - not of importance to the cache write system. More...
 
StringComparer KeyComparer [get]
 
- Events inherited from ImageResizer.Plugins.DiskCache.CachedFolder
FileDisappearedHandler FileDisappeared
 Fired when a file disappears from the cache folder without the cache index knowing about it. More...
 

Detailed Description

Provides thread-safe access to the index of the disk cache

Definition at line 12 of file CacheIndex.cs.


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