Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

LessCache

Serverless cache backend for Django and Flask

Working with: AWS Dynamodb

Join the chat at https://gitter.im/ebertti/lesscache https://img.shields.io/pypi/v/lesscache.svg?style=flat https://img.shields.io/pypi/pyversions/lesscache.svg?maxAge=2592000 https://img.shields.io/pypi/format/lesscache.svg?maxAge=2592000 https://img.shields.io/pypi/status/lesscache.svg?maxAge=2592000 https://img.shields.io/travis/ebertti/lesscache/master.svg?maxAge=2592000 https://img.shields.io/requires/github/ebertti/lesscache.svg?maxAge=2592000 https://img.shields.io/coveralls/ebertti/lesscache/master.svg?maxAge=2592000

Installation

pip

pip install lesscache

pipenv

pipenv install lesscache

Setup on Django

On Django Settings

instaled_apps = [
    ...
    'lesscache.compact.django'
]

CACHES = {
    'default': {
        'BACKEND': 'lesscache.compact.django.cache.DjangoCacheDynamodb',
        'TIMEOUT': 120  # default 120 seconds == 2minutes
        'KEY_PREFIX': 'less'  # default less
        'VERSION': 1  # default 1
        'KEY_FUNCTION': 'path.to.function' # f'{prefix}:{key}:{version}'

        'OPTIONS': {
            'aws_access_key_id': None       # need only if you dont have login
            'aws_secret_access_key': None   # on aws-cli with your key
            'aws_region_name': None         # or not in aws lambda

            'read_capacity_units': 1
            'write_capacity_units': 1
            'encode': 'path.to.encode'  # default: 'lesscache.encode.PickleEncode
        }
    }
}

Run manage command to create cache table on Dynamodb before using

python manage.py create_dynamodb_cache

Setup on Flask

WIP

How to contribute

WIP

About

Serverless cache backend for Django and Flask [WIP]

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages