memoize

Undocumented in source.

Members

Mixin templates

CachedProperty
mixintemplate CachedProperty(string name, string baseName = '_' ~ name)

The following code makes cached (memoized) property f

Templates

memoize
template memoize(alias fun)
template memoize(alias fun, uint maxSize)

The same as in Phobos std.functional.

memoizeMember
template memoizeMember(S, string name)
template memoizeMember(S, string name, uint maxSize)

Use it to memoize both a struct or class instance for a member function and function arguments like:

noLockMemoize
template noLockMemoize(alias fun)

must be locked explicitly!

noLockMemoize
template noLockMemoize(alias fun, uint maxSize)

must be locked explicitly!

noLockMemoizeMember
template noLockMemoizeMember(S, string name)
template noLockMemoizeMember(S, string name, uint maxSize)

Use it to memoize both a struct or class instance for a member function and function arguments like:

synchronizedMemoize
template synchronizedMemoize(alias fun)
template synchronizedMemoize(alias fun, uint maxSize)

Synchronized version of memoize using global (interthread) cache.

synchronizedMemoizeMember
template synchronizedMemoizeMember(S, string name)
template synchronizedMemoizeMember(S, string name, uint maxSize)

Use it to memoize both a struct or class instance for a member function and function arguments like:

Meta