Please enable JavaScript.
Coggle requires JavaScript to display documents.
8 Azure Cache for Redis - Coggle Diagram
8 Azure Cache for Redis
-
-
Data expiration
-
Azure Cache for Redis is an in-memory database and you don't have as much memory available to use as you would if you were storing on disk.
EXPIRE: Sets the timeout of a key in seconds
PEXPIRE: Sets the timeout of a key in milliseconds
EXPIREAT: Sets the timeout of a key using an absolute Unix timestamp in seconds
PEXPIREAT: Sets the timeout of a key using an absolute Unix timestamp in milliseconds
TTL: Returns the remaining time a key has to live in seconds
PTTL: Returns the remaining time a key has to live in milliseconds
PERSIST: Makes a key never expire
Eviction policies
most critical resource for Azure Cache for Redis,
problems when you begin adding data that exceeds the amount of memory available
-
eviction policies,
indicate how data should be handled when you run out of memory.
- noeviction: No eviction policy. Returns an error message if you attempt to insert data.
- allkeys-lru: Removes the least recently used key.
- allkeys-random: Removes a random key.
- volatile-lru: Removes the least recently used key out of all the keys with an expiration set.
- volatile-ttl: Removes the key with the shortest time to live based on the expiration set for it.
- volatile-random: Removes a random key that has an expiration set.
Advanced Settings, and use the maxmemory-policy
Cache-aside pattern
- quick data retrieval
- data is read often
-
manage updating data
When you update data in your application, you should first delete the data in the cache
- Lifetime
- Evicting
- priming
- coniostency