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

__delattr__(name, /)

Implement delattr(self, name).

__dir__(/)

Default dir() implementation.

__eq__(value, /)

Return self==value.

__format__(format_spec, /)

Default object formatter.

__ge__(value, /)

Return self>=value.

__getattribute__(name, /)

Return getattr(self, name).

__getstate__()

Helper for pickle.

__gt__(value, /)

Return self>value.

__hash__(/)

Return hash(self).

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

__init_subclass__

This method is called when a class is subclassed.

__le__(value, /)

Return self<=value.

__lt__(value, /)

Return self<value.

__ne__(value, /)

Return self!=value.

__new__(*args, **kwargs)

__reduce__(/)

Helper for pickle.

__reduce_ex__(protocol, /)

Helper for pickle.

__repr__()

Return repr(self).

__setattr__(name, value, /)

Implement setattr(self, name, value).

__setstate__(state)

__sizeof__(/)

Size of object in memory, in bytes.

__str__(/)

Return str(self).

__subclasshook__

Abstract classes can override this to customize issubclass().

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

__annotations__

__dict__

__doc__

__module__

__weakref__

list of weak references to the object

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.