xtr_cache.command ¶
The cache:pool:* console commands.
Importing this module declares them. With a container, the cache bundle loads
it when the console bundle is active, and every command acts on the pools the
bundle registered. Without one, give them pools with :func:use_pools:
from xtr_cache import CachePoolClearer, FilesystemAdapter
from xtr_cache.command import use_pools
use_pools(CachePoolClearer({"app": FilesystemAdapter("app")}))
Needs xtr-console installed beside this package.
CachePoolClearCommand ¶
Bases: PoolCommand
Clears cache pools.
CachePoolDeleteCommand ¶
Bases: PoolCommand
Deletes an item from a cache pool.
CachePoolInvalidateTagsCommand ¶
Bases: PoolCommand
Invalidates cache tags, in every tag-aware pool or in the ones named.
CachePoolListCommand ¶
Bases: PoolCommand
Lists the available cache pools.
CachePoolPruneCommand ¶
Bases: PoolCommand
Prunes cache pools: removes the expired values their backend keeps.
use_pools ¶
Have every cache command act on pools wherever no container supplies them.