UNKNOWN
Project description
Muffin-DogpileCache
#################
.. _description:
Muffin-DogpileCache -- A simple DogpileCache helper plugin for muffin_ framework.
.. _requirements:
Requirements
=============
- python >= 3.4
- muffin >= 0.5.5
.. _installation:
Installation
=============
**Muffin-DogpileCache** should be installed using pip: ::
pip install muffin-dogpilecache
.. _usage:
Usage
=====
Add *muffin-dogpilecache* to muffin plugin list:
.. code-block:: python
import muffin
app = muffin.Application(
'example',
PLUGINS=(
'muffin_dogpilecache',
)
)
Add your *configurations* for ``dogpile.cache``:
.. code-block:: python
DOGPILECACHE_CONFIGS = {
'cache.local.backend': 'dogpile.cache.dbm',
'cache.local.arguments.filename': './dbmfile.dbm',
'cache.redis.backend': 'dogpile.cache.redis',
'cache.redis.arguments.host': 'localhost',
'cache.redis.arguments.port': 6379,
}
Associate each configuration with a ``dogpile.cache`` *region*:
.. code-block:: python
DOGPILECACHE_REGIONS = {
'default': 'cache.local.',
'redis': 'cache.redis.',
}
Decorate your functions:
.. code-block:: python
@app.ps.dogpilecache.default.cache_on_arguments()
def my_local_cached_function():
...
@app.ps.dogpilecache.redis.cache_on_arguments()
def my_redis_cached_function():
...
.. _options:
Options
-------
========================== ==============================================================
*DOGPILECACHE_CONFIGS* Configurations for regions
========================== ==============================================================
*DOGPILECACHE_REGIONS* Regions related with the configurations prefix
========================== ==============================================================
*DOGPILECACHE_TEST* If true, set regions with ``dogpile.cache.null``
========================== ==============================================================
License
=======
Licensed under a `MIT license`_.
.. _links:
.. _muffin: https://github.com/klen/muffin
.. _abnerpc: https://github.com/abnerpc
.. _MIT license: http://opensource.org/licenses/MIT
#################
.. _description:
Muffin-DogpileCache -- A simple DogpileCache helper plugin for muffin_ framework.
.. _requirements:
Requirements
=============
- python >= 3.4
- muffin >= 0.5.5
.. _installation:
Installation
=============
**Muffin-DogpileCache** should be installed using pip: ::
pip install muffin-dogpilecache
.. _usage:
Usage
=====
Add *muffin-dogpilecache* to muffin plugin list:
.. code-block:: python
import muffin
app = muffin.Application(
'example',
PLUGINS=(
'muffin_dogpilecache',
)
)
Add your *configurations* for ``dogpile.cache``:
.. code-block:: python
DOGPILECACHE_CONFIGS = {
'cache.local.backend': 'dogpile.cache.dbm',
'cache.local.arguments.filename': './dbmfile.dbm',
'cache.redis.backend': 'dogpile.cache.redis',
'cache.redis.arguments.host': 'localhost',
'cache.redis.arguments.port': 6379,
}
Associate each configuration with a ``dogpile.cache`` *region*:
.. code-block:: python
DOGPILECACHE_REGIONS = {
'default': 'cache.local.',
'redis': 'cache.redis.',
}
Decorate your functions:
.. code-block:: python
@app.ps.dogpilecache.default.cache_on_arguments()
def my_local_cached_function():
...
@app.ps.dogpilecache.redis.cache_on_arguments()
def my_redis_cached_function():
...
.. _options:
Options
-------
========================== ==============================================================
*DOGPILECACHE_CONFIGS* Configurations for regions
========================== ==============================================================
*DOGPILECACHE_REGIONS* Regions related with the configurations prefix
========================== ==============================================================
*DOGPILECACHE_TEST* If true, set regions with ``dogpile.cache.null``
========================== ==============================================================
License
=======
Licensed under a `MIT license`_.
.. _links:
.. _muffin: https://github.com/klen/muffin
.. _abnerpc: https://github.com/abnerpc
.. _MIT license: http://opensource.org/licenses/MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for muffin-dogpilecache-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bdc486ff513fdfbf76586ad3091c9c5c5993bab0db34924d9bf0fb619ca7560 |
|
MD5 | bd06caa8dbf35b7b0325ed5af4f7e2b2 |
|
BLAKE2b-256 | 312381d721773573c17a26907afac291d5c3e7c09098ee243354d89d537984f9 |