Cache
clear_cache_region(ext_name, *modules, cache_name=None)
¶
Clears cached functions in the given cache region.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ext_name
|
the name of the extension (without the ckanext-) |
required | |
modules
|
modules containing cached functions |
()
|
|
cache_name
|
a name for the cache region, if different from the ext_name |
None
|
Source code in ckantools/cache.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |
configure_cache(ckan_config, ext_name, cache_name=None)
¶
Configures a beaker cache region using settings from the CKAN config.
Use in plugin.py:IConfigurable.configure().
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ckan_config
|
CKAN config from configure() |
required | |
ext_name
|
the name of the extension (without the ckanext-) |
required | |
cache_name
|
a name for the cache region, if different from the ext_name |
None
|
Source code in ckantools/cache.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | |