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