Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Key Expiration and Cache Eviction Policy #15

Closed
ezrasingh opened this issue Aug 13, 2024 · 0 comments · Fixed by #16
Closed

Implement Key Expiration and Cache Eviction Policy #15

ezrasingh opened this issue Aug 13, 2024 · 0 comments · Fixed by #16
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@ezrasingh
Copy link
Owner

Is your feature request related to a problem? Please describe.

I'm finding that without key expiration and a cache eviction policy, the system can become overwhelmed with stale or unnecessary data, leading to increased memory usage and reduced performance over time. This is especially problematic for large-scale applications where data is frequently updated or needs to be kept fresh.

Describe the solution you'd like

I'd like to implement support for key expiration and a cache eviction policy. This would allow us to automatically remove expired or least-recently-used (LRU) keys from the cache, ensuring that the system remains efficient and responsive. Key expiration would allow setting a time-to-live (TTL) for cache entries, after which they would be automatically evicted. The cache eviction policy would manage cache size by removing the least valuable entries when the cache reaches its capacity.

Describe alternatives you've considered

  • Implementing a manual cleanup process where stale keys are removed during off-peak hours, though this may not be as efficient as automatic eviction.
  • Using a third-party caching library that supports these features, but it would add external dependencies and might not integrate well with our current system architecture.

Additional context

Adding support for key expiration and cache eviction would improve overall system performance, reduce memory footprint, and ensure that only relevant data is retained in the cache. This feature could also provide better control over the cache behavior, adapting it to the specific needs of different applications.

@ezrasingh ezrasingh added the enhancement New feature or request label Aug 13, 2024
@ezrasingh ezrasingh added this to the v1.0.0 milestone Aug 13, 2024
@ezrasingh ezrasingh moved this to In progress in Geoprox v1 - Release Aug 13, 2024
@ezrasingh ezrasingh moved this from In progress to Ready in Geoprox v1 - Release Aug 13, 2024
@ezrasingh ezrasingh linked a pull request Aug 16, 2024 that will close this issue
8 tasks
ezrasingh added a commit that referenced this issue Aug 16, 2024
* Added support for key expiration

* Added key expiration and ttl support

* Removed debug lines

* clippy
@github-project-automation github-project-automation bot moved this from Ready to Done in Geoprox v1 - Release Aug 16, 2024
@ezrasingh ezrasingh self-assigned this Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant