-
0.2.0
- Updating the interface. Moving elements from the Local CMC to the interface.
-
0.1.0
- Initial record
- Refactor Cryptographic Materials Cache Specification
Language | Confirmed Compatible with Spec Version | Minimum Version Confirmed | Implementation |
---|---|---|---|
C | n/a | n/a | local_cache.c |
Javascript | 0.1.0 | 0.1.0 | get_local_cryptographic_materials_cache.ts |
Python | n/a | n/a | caches/local.py |
Java | 0.1.0 | 1.3.0 | LocalCryptoMaterialsCache.java |
The local Cryptographic Materials Cache (local CMC) is a built-in implementation of the CMC interface provided by the AWS Encryption SDK. The local CMC is a configurable, in-memory, least recently used (LRU) cache. It provides atomic access to cache entries per cache identifier.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
On initialization of the local CMC, the caller MUST provide the following:
The local CMC MUST also define the following:
The entry capacity is the maximum size of the local CMC in terms of cache entries. The local CMC MUST NOT store more entries than this value, except temporarily while performing a Put Cache Entry operation. The local CMC MUST accept entry capacity values between zero and an implementation-defined maximum, inclusive.
The entry pruning tail size is the number of least recently used entries that the local CMC MUST check during pruning for TTL-expired entries to evict.
When performing a Put Cache Entry operation, the local CMC should not prune TTL-expired cache entries. This is because an entry is added after a get miss. A prune happens during the get operation.
While performing a Put Cache Entry operation, the local CMC MAY store more entries than the entry capacity. However, before returning, the local CMC MUST evict least-recently used entries until the number of stored entries does not exceed the entry capacity.
When performing a Get Cache Entry operation, the local CMC MUST prune TTL-expired cache entries. The local CMC MUST NOT return any TTL-expired entry.
To prune TTL-expired cache entries,
the local CMC MUST evict all TTL-expired entries
among the N
least recently used entries,
where N
is the Entry Pruning Tail Size.
This means that a maximum of N
entries
and a minimum of 0
entries will be evicted.
The local CMC SHOULD also periodically evict all TTL-expired entries
among the N
least recently used entries.