Skip to main content

WIP

Project description

fastack-cache

fastack-cache is a caching plugin for fastack ❤️

This plugin is inspired by the django cache framework and django-redis!

Currently only supports redis as cache backend. And the plan in the future there will be aioredis and memcached as cache backends!

Installation

pip install fastack-cache

Usage

Add the plugin to your project configuration:

PLUGINS = [
    "fastack_cache",
    ...
]

Configuration:

REDIS_HOST = "localhost"
REDIS_PORT = 6900
REDIS_DB = 0
CACHES = {
    # cache name
    "default": {
        # cache backend
        "BACKEND": "fastack_cache.backends.redis.RedisCache",
        # Cache options to be passed to the Redis(...) class
        "OPTIONS": {
            "host": REDIS_HOST,
            "port": REDIS_PORT,
            "db": REDIS_DB,
        },
        # Serializer for converting data into cache
        "SERIALIZER": {
            "CLASS": "fastack_cache.serializers.JSONSerializer",
            "OPTIONS": {
                # Option to pass when dumps() method in serializer class is called
                "DUMPS": {},
                # Option to pass when loads() method in serializer class is called
                "LOADS": {}
            }
        }
    }
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastack-cache-0.2.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

fastack_cache-0.2.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file fastack-cache-0.2.0.tar.gz.

File metadata

  • Download URL: fastack-cache-0.2.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.8.2 Linux/5.11.0-1022-azure

File hashes

Hashes for fastack-cache-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f4dee060c2c931281b35708496509736b952d27a698bc29d815437d73175c645
MD5 c7e65b1c7ac3448e802155da0d79f732
BLAKE2b-256 99b3d980d1993d472eab7b5cf9d74e00a2d6f1c7e3f8aa9a25a932786bdba905

See more details on using hashes here.

File details

Details for the file fastack_cache-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: fastack_cache-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.8.2 Linux/5.11.0-1022-azure

File hashes

Hashes for fastack_cache-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 43fa45c81154b182d9f18bd815300e5445a7554a907d675e55c105243b45d56c
MD5 502dc884df11e256e75d7029d1b2ac69
BLAKE2b-256 5f91c302d29b6812a205282c97e1e337b7dababdc34cded455156e31f9bcc517

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page