|
| CleanupStrategy (Node n) |
|
void | LoadFrom (Node n) |
| Loads settings from the specified node. Attribute names and property names must match. More...
|
|
bool | MeetsCleanupCriteria (CachedFileInfo i) |
|
bool | MeetsOverMaxCriteria (CachedFileInfo i) |
|
bool | ShouldRemove (string relativePath, CachedFileInfo info, bool isOverMax) |
|
override IEnumerable< IIssue > | GetIssues () |
| Returns a copy of the list of reported issues. More...
|
|
| IssueSink (string defaultSource) |
|
virtual void | AcceptIssue (IIssue i) |
| Adds the specified issue to the list unless it is an exact duplicate of another instance. More...
|
|
|
void | LoadProperty (NameValueCollection data, string key) |
|
|
TimeSpan | StartupDelay [get, set] |
| How long to wait before beginning the initial cache indexing and cleanup. More...
|
|
TimeSpan | MinDelay [get, set] |
| The minimum amount of time to wait after the most recent BeLazy to begin working again. More...
|
|
TimeSpan | MaxDelay [get, set] |
| The maximum amount of time to wait between work segements More...
|
|
TimeSpan | OptimalWorkSegmentLength [get, set] |
| The optimal length for a work segment. Not always achieved. More...
|
|
int | TargetItemsPerFolder [get, set] |
| The ideal number of cached files per folder. (defaults to 400) Only reached if it can be achieved without volating the AvoidRemoval... limits More...
|
|
int | MaximumItemsPerFolder [get, set] |
| The maximum number of cached files per folder. (defaults to 1000) Only reached if it can be achieved without violating the ProhibitRemoval... limits More...
|
|
TimeSpan | AvoidRemovalIfUsedWithin [get, set] |
| Please note "LastUsed" values are (initially) only accurate to about a hour, due to delayed write. If a file has been used after the app started running, the the last used date is accurate. More...
|
|
TimeSpan | AvoidRemovalIfCreatedWithin [get, set] |
|
TimeSpan | ProhibitRemovalIfUsedWithin [get, set] |
| Please note "LastUsed" values are (initially) only accurate to about a hour, due to delayed write. If a file has been used after the app started running, the the last used date is accurate. More...
|
|
TimeSpan | ProhibitRemovalIfCreatedWithin [get, set] |
|
|
string | defaultSource = null |
|
Definition at line 12 of file CleanupStrategy.cs.
override IEnumerable<IIssue> ImageResizer.Plugins.DiskCache.CleanupStrategy.GetIssues |
( |
| ) |
|
|
inlinevirtual |
Returns a copy of the list of reported issues.
- Returns
Reimplemented from ImageResizer.Configuration.Issues.IssueSink.
Definition at line 197 of file CleanupStrategy.cs.
198 List<IIssue> issues =
new List<IIssue>(base.GetIssues());
199 Type t = this.GetType();
200 StringBuilder sb =
new StringBuilder();
201 foreach(
string s
in defaults.Keys){
202 PropertyInfo pi = t.GetProperty(s);
203 object v = pi.GetValue(
this,null);
204 if (!v.Equals(defaults[s]))
205 sb.AppendLine(s +
" has been changed to " + v.ToString() +
" instead of the suggested value, " + defaults[s].ToString());
208 issues.Add(
new Issue(
"The cleanup strategy settings have been changed. This is not advised, and may have ill effects. " +
209 "\nThe default settings for the cleanup strategy were carefully chosen, and should not be changed except at the suggestion of the author.\n" + sb.ToString(), IssueSeverity.Warning));
void ImageResizer.Plugins.DiskCache.CleanupStrategy.LoadFrom |
( |
Node |
n | ) |
|
|
inline |
Loads settings from the specified node. Attribute names and property names must match.
- Parameters
-
Definition at line 28 of file CleanupStrategy.cs.
29 if (n == null)
return;
30 foreach (
string s
in properties)
31 LoadProperty(n.
Attrs, s);
NameValueCollection Attrs
Attributes
TimeSpan ImageResizer.Plugins.DiskCache.CleanupStrategy.AvoidRemovalIfUsedWithin |
|
getset |
Please note "LastUsed" values are (initially) only accurate to about a hour, due to delayed write. If a file has been used after the app started running, the the last used date is accurate.
Definition at line 147 of file CleanupStrategy.cs.
TimeSpan ImageResizer.Plugins.DiskCache.CleanupStrategy.MaxDelay |
|
getset |
The maximum amount of time to wait between work segements
Definition at line 109 of file CleanupStrategy.cs.
int ImageResizer.Plugins.DiskCache.CleanupStrategy.MaximumItemsPerFolder |
|
getset |
The maximum number of cached files per folder. (defaults to 1000) Only reached if it can be achieved without violating the ProhibitRemoval... limits
Definition at line 136 of file CleanupStrategy.cs.
TimeSpan ImageResizer.Plugins.DiskCache.CleanupStrategy.MinDelay |
|
getset |
The minimum amount of time to wait after the most recent BeLazy to begin working again.
Definition at line 101 of file CleanupStrategy.cs.
TimeSpan ImageResizer.Plugins.DiskCache.CleanupStrategy.OptimalWorkSegmentLength |
|
getset |
The optimal length for a work segment. Not always achieved.
Definition at line 118 of file CleanupStrategy.cs.
TimeSpan ImageResizer.Plugins.DiskCache.CleanupStrategy.ProhibitRemovalIfUsedWithin |
|
getset |
Please note "LastUsed" values are (initially) only accurate to about a hour, due to delayed write. If a file has been used after the app started running, the the last used date is accurate.
Definition at line 164 of file CleanupStrategy.cs.
TimeSpan ImageResizer.Plugins.DiskCache.CleanupStrategy.StartupDelay |
|
getset |
How long to wait before beginning the initial cache indexing and cleanup.
Definition at line 92 of file CleanupStrategy.cs.
int ImageResizer.Plugins.DiskCache.CleanupStrategy.TargetItemsPerFolder |
|
getset |
The ideal number of cached files per folder. (defaults to 400) Only reached if it can be achieved without volating the AvoidRemoval... limits
Definition at line 128 of file CleanupStrategy.cs.
The documentation for this class was generated from the following file: