Skip to content

august.memory ​

Install this source library with aug add https://github.com/GreenPandaStudios/augscript/src/stdlib/memory --as memory, then import its public names from memory.

Signatures show result types and checked errors. See packages to pin a release and language constructs for built-in types.

StoreFull ​

text
StoreFull() implements Error

The bounded store could not accept another live entry.

Source

ExpiringStore ​

text
capability ExpiringStore<T implements Data>

A bounded, expiring capability for immutable values. Each generic DI binding has its own table.

Source

ExpiringStore.put ​

text
put(string key, T value, int expires, int now) unless StoreFull

Remove expired entries, then store at most 512 live entries. Time is supplied by the caller.

Uses ExpiringStore.put.

Source

ExpiringStore.take ​

text
take(string key, int now) returns optional T

Atomically remove a value. Expired or absent entries return null.

Uses ExpiringStore.take.

Source

ExpiringStore.get ​

text
get(string key, int now) returns optional T

Read a live value without consuming it.

Uses ExpiringStore.get.

Source

MemoryStore ​

text
MemoryStore<T implements Data>() implements ExpiringStore<T>

A synchronized table with short critical sections and no I/O while locked.

Source

MemoryStore.put ​

text
put(string key, T value, int expires, int now) unless StoreFull

Remove expired entries, then store at most 512 live entries. Time is supplied by the caller.

Uses ExpiringStore<T>.put.

Source

MemoryStore.take ​

text
take(string key, int now) returns optional T

Atomically remove a value. Expired or absent entries return null.

Uses ExpiringStore<T>.take.

Source

MemoryStore.get ​

text
get(string key, int now) returns optional T

Read a live value without consuming it.

Uses ExpiringStore<T>.get.

Source

The world runs on language