tiled.client.cache.Cache

class tiled.client.cache.Cache(filepath=None, capacity=500000000, max_item_size=500000, readonly=False)[source]
__init__(filepath=None, capacity=500000000, max_item_size=500000, readonly=False)[source]

Methods

__init__([filepath, capacity, ...])

clear()

Drop all entries from HTTP response cache.

close()

Close cache.

count()

Number of responses cached

delete(request)

Delete an entry from cache.

get(request)

Get cached response from Cache.

set(*, request, response[, content])

Set new response entry in cache.

size()

Size of response bodies in bytes (does not count headers and other auxiliary info)

write_safe()

Check that it is safe to write.

Attributes

capacity

Max capacity in bytes.

filepath

Filepath of SQLite database storing cache data

max_item_size

Max size of a response body eligible for caching.

readonly

If True, cache be read but not updated.