3 Commits

Author SHA1 Message Date
Wolfgang Bumiller
c66e5432e7 shared-cache: minor style adaptation
(more concise & readable)

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-08-09 11:10:48 +02:00
Lukas Wagner
846e85ed2e cache: add benchmark example
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-08-09 11:01:30 +02:00
Lukas Wagner
0febb5045a cache: add new crate 'proxmox-shared-cache'
This crate contains a file-backed, rotating cache.
The cache should be safe to be accessed from multiple processes at
once.

The cache stores the value at the provided path.
If `keep_old` is >0, the cache will keep up to `keep_old` versions
around which can be queried via the `get_last` method.
The value and its history are stored in the same file,
each generation represented by a single line of JSON.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-08-09 11:01:30 +02:00