dotnetcore / EasyCaching

:boom: EasyCaching is an open source caching library that contains basic usages and some advanced usages of caching which can help us to handle caching more easier!
MIT License
1.92k stars 324 forks source link

EasyCaching cache get expired in 2 weeks when service traffic is low #520

Open garfage opened 5 months ago

garfage commented 5 months ago

Description

EasyCaching cache get expired in 2 weeks when service traffic is low

Steps to Reproduce

  1. Set in-memory cache A with expired time in one year (easyCaching version, 1.4.1, 1.9.2, both of them has this issue)
  2. Cache refresh every hour by using background cron job
  3. Deploy the service to Kubernetes which is low traffic
  4. After 14 days later, the cache expired

Expected behavior: Cache should never get expired

Actual behavior: Cache expired in 14 days after deployment, get back to normal after redeploy

catcherwong commented 4 months ago

@garfage Thanks for your interest in this project.

Do you mean the in-memory cache should not expired after the deployment of this service?

Or the service runs well, but after 14 days, the in-memory cache get expired?

garfage commented 2 months ago

@catcherwong The cache set expire time is one year later, it should not get expired after 14 days.