View source on GitHub
|
Implements an LRU cache by intrusive chaining on elements.
Inherits From: expected_type
google.appengine.api.memcache.memcache_stub.LRU()
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.
Attributes | |
|---|---|
newest
|
|
oldest
|
|
total_byte_size
|
|
Methods
Clear
Clear()
Clears the LRU chain.
IsEmpty
IsEmpty()
Checks if the LRU chain is empty.
Remove
Remove(
element
)
Removes an item from the LRU chain.
RemoveOldest
RemoveOldest()
Removes the oldest item from the LRU chain.
Update
Update(
element
)
Updates an item in the LRU chain.
__len__
__len__()
View source on GitHub