ae.sys.persistence.core

ae.sys.persistence.core

Members

Enums

FlushPolicy
enum FlushPolicy
Undocumented in source.
LoadPolicy
enum LoadPolicy

FileCache policy for when to (re)load data from disk.

Functions

delayed
bool delayed(FlushPolicy policy)
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

filesystemTimestampGranularity
enum filesystemTimestampGranularity;
Undocumented in source.
filesystemTimestampGranularity
enum filesystemTimestampGranularity;
Undocumented in source.

Mixin templates

CacheCore
mixintemplate CacheCore(alias DataGetter, alias KeyGetter, alias DataPutter = None, FlushPolicy flushPolicy = FlushPolicy.none)

Cache values in-memory, and automatically load/save them as needed via the specified functions. Actual loading/saving is done via alias functions. KeyGetter may return .init (of its return type) if the resource does not yet exist, but once it returns non-.init it may not return .init again. A bool key can be used to load a resource from disk only once (lazily), as is currently done with LoadPolicy.once. Delayed flush policies require a bool key, to avoid mid-air collisions.

Structs

FileCache
struct FileCache(alias DataGetter, alias DataPutter = None, FlushPolicy flushPolicy = FlushPolicy.none, LoadPolicy loadPolicy = LoadPolicy.automatic)
Undocumented in source.
None
struct None
Undocumented in source.

Meta

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Authors

Vladimir Panteleev <vladimir@thecybershadow.net>