godaddy / asherah

Asherah is a multi-language, cross-platform application encryption SDK
MIT License
75 stars 47 forks source link

[Go] Caching Updates #955

Closed aka-bo closed 10 months ago

aka-bo commented 11 months ago

Caching Updates

Introducing the new Cache Package

Package pkg/cache provides a cache implementation with support for multiple eviction policies, including: LRU, Segmented LRU, LFU, and TinyLFU.

Other notable features include:

Improved Key Caching

Key caching has been refactored to utilize the new cache package.

Added support for a shared intermediate key cache. When enabled, and session caching disabled, caching performance mirrors that of the legacy session cache.

Smaller caches (capacity < 100) automatically default to synchronous eviction process to help prevent memlock exhaustion in low memory environments (e.g. AWS Lambda).

Session Caching

Session caching has also been refactored using the new cache package.

Also...

Tracing Benchmarks

A new integrationtest/tracing package for benchmarking the performance of the SessionFactory class and its dependencies. It compares Metastore and KMS access patterns with different cache configurations by playing back access traces.

report-session-cache