Notice: Over the next few months, we're reorganizing the App Engine documentation site to make it easier to find content and better align with the rest of Google Cloud products. The same content will be available, but the navigation will now match the rest of the Cloud products.

Python 3.10 is now generally available.

google.appengine.api.memcache.memcache_stub.LRU

Implements an LRU cache by intrusive chaining on elements.

Inherits From: expected_type

Also keeps track of the total size of the elements in bytes, as well as the length of the LRU chain.

Heavily inspired by //j/c/g/appengine/api/memcache/dev/LRU.java.

newest

oldest

total_byte_size

Methods

Clear

View source

Clears the LRU chain.

IsEmpty

View source

Checks if the LRU chain is empty.

Remove

View source

Removes an item from the LRU chain.

RemoveOldest

View source

Removes the oldest item from the LRU chain.

Update

View source

Updates an item in the LRU chain.

__len__

View source