|
| DiskCache () |
| Creates a disk cache in the /imagecache folder More...
|
|
| DiskCache (string virtualDir) |
| Creates a DiskCache instance at the specified location. Must be installed as a plugin to be operational. More...
|
|
void | LoadSettings (Config c) |
| Uses the defaults from the resizing.diskcache section in the specified configuration. Throws an invalid operation exception if the DiskCache is already started. More...
|
|
IPlugin | Install (Config c) |
| Loads the settings from 'c', starts the cache, and registers the plugin. Will throw an invalidoperationexception if already started. More...
|
|
bool | Uninstall (Config c) |
| Uninstalls the plugin. Should reverse all changes made during Install More...
|
|
bool | IsConfigurationValid () |
| Returns true if the configured settings are valid and .NET (not NTFS) permissions will work. More...
|
|
bool | Start () |
| Attempts to start the DiskCache using the current settings. Returns true if succesful or if already started. Returns false on a configuration error. Called by Install() More...
|
|
bool | Stop () |
| Returns true if stopped succesfully. Cannot be restarted More...
|
|
bool | CanProcess (HttpContext current, IResponseArgs e) |
| Returns false if the cache is unable to process the request. If false, the caller should fall back to a different cache More...
|
|
void | Process (HttpContext context, IResponseArgs e) |
| Must update the cache if needed, then either rewrite, redirect or serve the cached data. More...
|
|
CacheResult | Process (IResponseArgs e) |
|
IEnumerable< IIssue > | GetIssues () |
|
|
int | Subfolders [get, set] |
| Controls how many subfolders to use for disk caching. Rounded to the next power of to. (1->2, 3->4, 5->8, 9->16, 17->32, 33->64, 65->128,129->256,etc.) NTFS does not handle more than 8,000 files per folder well. Larger folders also make cleanup more resource-intensive. Defaults to 32, which combined with the default setting of 400 images per folder, allows for scalability to 12,800 actively used image versions. For example, given a desired cache size of 100,000 items, this should be set to 256. More...
|
|
bool | Enabled [get, set] |
| Allows disk caching to be disabled for debuginng purposes. Defaults to true. More...
|
|
bool | AutoClean [get, set] |
| If true, items from the cache folder will be automatically 'garbage collected' if the cache size limits are exceeded. Defaults to false. More...
|
|
CleanupStrategy | CleanupStrategy [get, set] |
| Only relevant when AutoClean=true. Settings about how background cache cleanup are performed. It is best not to modify these settings. There are very complicated and non-obvious factors involved in their choice. More...
|
|
int | CacheAccessTimeout [get, set] |
| How many milliseconds to wait for a cached item to be available. Values below 0 are set to 0. Defaults to 15 seconds. Actual time spent waiting may be 2 or 3x this value, if multiple layers of synchronization require a wait. More...
|
|
bool | HashModifiedDate [get, set] |
| If true, when a source file is changed, a new file will be created instead of overwriting the old cached file. This helps prevent file lock contention on high-traffic servers. Defaults to true. Do NOT set this to false in a Web Garden or if you have overlapped recycle enabled, as you may risk having occasional failed requests due to write contention by separate proccesses. Changes the hash function, so you should delete the cache folder whenever this setting is modified. More...
|
|
bool | AsyncWrites [get, set] |
| If true, writes to the disk cache will be performed outside the request thread, allowing responses to return to the client quicker. More...
|
|
int | AsyncBufferSize [get, set] |
| If more than this amount of memory (in bytes) is currently allocated by queued writes, the request will be processed synchronously instead of asynchronously. More...
|
|
string | VirtualCacheDir [get, set] |
| Sets the location of the cache directory. Can be a virtual path (like /App/imagecache) or an application-relative path (like ~/imagecache, the default). Relative paths are assummed to be relative to the application root. All values are converted to virtual path format upon assignment (/App/imagecache) Will throw an InvalidOperationException if changed after the plugin is installed. More...
|
|
string | PhysicalCacheDir [get] |
| Returns the physical path of the cache directory specified in VirtualCacheDir. More...
|
|
ILogger | Logger [get] |
|
bool | Started [get] |
| Returns true if the DiskCache instance is operational. More...
|
|
ILogger | Logger [get] |
|
Provides methods for creating, maintaining, and securing the disk cache.
Definition at line 36 of file DiskCache.cs.
bool ImageResizer.Plugins.DiskCache.DiskCache.HashModifiedDate |
|
getset |
If true, when a source file is changed, a new file will be created instead of overwriting the old cached file. This helps prevent file lock contention on high-traffic servers. Defaults to true. Do NOT set this to false in a Web Garden or if you have overlapped recycle enabled, as you may risk having occasional failed requests due to write contention by separate proccesses. Changes the hash function, so you should delete the cache folder whenever this setting is modified.
Definition at line 98 of file DiskCache.cs.
int ImageResizer.Plugins.DiskCache.DiskCache.Subfolders |
|
getset |
Controls how many subfolders to use for disk caching. Rounded to the next power of to. (1->2, 3->4, 5->8, 9->16, 17->32, 33->64, 65->128,129->256,etc.) NTFS does not handle more than 8,000 files per folder well. Larger folders also make cleanup more resource-intensive. Defaults to 32, which combined with the default setting of 400 images per folder, allows for scalability to 12,800 actively used image versions. For example, given a desired cache size of 100,000 items, this should be set to 256.
Definition at line 45 of file DiskCache.cs.