Project caching scheme - expiration policy

Expiration Policy

  • effect
    • save space
    • Weak for data consistency
  • Expiration Policy
    • Timing expired
      • Low efficiency, each data needs to set the timer counts
    • Inert expired
      • At query time, before going to check the validity of data, if expired, nil is returned, and delete outdated data
    • Regular expired
      • Every 100ms, withdrawing a portion of the random verification data expires, if expired, the data deleted
  • redis choice
    • + Inert expired expire periodically (every 100ms to set the expiration time of random data query and deletion of expired data)

Guess you like

Origin www.cnblogs.com/oklizz/p/11420225.html
Recommended