Caching Mechanism:
At LightningUserVault, we've embraced modularity in caching just as we did with storage. Simply align with our Cache interface, and you're free to integrate any caching system you fancy. While we're currently powered by memcache
, the choice is all yours!
โ Currently supported:
memcache
๐ช๏ธ How It Works
Our caching mechanism, often referred to as "Read-Through Cache", optimizes data access in the following manner:
First-time Read: When data is read for the first time, it's fetched from the primary storage and simultaneously stored in the cache.
Subsequent Reads: For any subsequent requests for the same data, it's swiftly fetched from the cache, ensuring lightning-fast access.
๐ Future Enhancements:
We aim to expand our caching strategies to include:
Write-Through Cache
Write-Around Cache
Write-Back Cache
and more.
๐ Caching Interface:
If you're interested in adding more storage options, here's the interface to guide you:
๐งช Mock Implementations for Testing
For developers and testers, we offer mock implementation of the cache interface
Usage example:
Last updated