FileCache

Wraps some data stored in a file on disk.

Members

Aliases

_FileCache_dataPutter
alias _FileCache_dataPutter = None
Undocumented in source.

Functions

_FileCache_dataGetter
ReturnType!DataGetter _FileCache_dataGetter()
Undocumented in source. Be warned that the author may not have intended to support it.
_FileCache_dataPutter
void _FileCache_dataPutter(T t)
Undocumented in source. Be warned that the author may not have intended to support it.
_FileCache_keyGetter
SysTime _FileCache_keyGetter()
Undocumented in source. Be warned that the author may not have intended to support it.
_FileCache_keyGetter
bool _FileCache_keyGetter()
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

_FileCache_loadPolicy
enum _FileCache_loadPolicy;
Undocumented in source.
_FileCache_loadPolicy
enum _FileCache_loadPolicy;
Undocumented in source.

Mixins

__anonymous
mixin CacheCore!(_FileCache_dataGetter, _FileCache_keyGetter, _FileCache_dataPutter, flushPolicy)
Undocumented in source.

Variables

fileName
string fileName;

File name containing the data.

Mixed In Members

From mixin CacheCore!(_FileCache_dataGetter, _FileCache_keyGetter, _FileCache_dataPutter, flushPolicy)

_CacheCore_Data
alias _CacheCore_Data = ReturnType!DataGetter
Undocumented in source.
_CacheCore_Key
alias _CacheCore_Key = ReturnType!KeyGetter
Undocumented in source.
_CacheCore_readOnly
enum _CacheCore_readOnly;
Undocumented in source.
cachedData
_CacheCore_Data cachedData;

The currently loaded version of the data.

cachedDataKey
_CacheCore_Key cachedDataKey;

The key (version) of the last loaded version of the data.

_CacheCore_update
void _CacheCore_update()
Undocumented in source. Be warned that the author may not have intended to support it.
_CacheCore_data
auto _CacheCore_data [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
_CacheCore_data
auto ref _CacheCore_data [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
save
void save()

Save the data. Obtain a fresh copy of the key afterwards (by reading it again), unless exiting is true.

~this
~this()
Undocumented in source.
_CacheCore_registerFlush
void _CacheCore_registerFlush()
Undocumented in source. Be warned that the author may not have intended to support it.
_CacheCore_pending
typeof(this)*[] _CacheCore_pending;
Undocumented in source.

Parameters

DataGetter

Callable which accepts a file name and returns its contents as some D value.

DataPutter

Callable which performs the reverse operation, writing the value to the file.

flushPolicy

When to save changes to the data to disk.

loadPolicy

When to reload data from disk.

Meta