diff --git a/README.md b/README.md index 7d1f192..5ffd0fe 100644 --- a/README.md +++ b/README.md @@ -24,12 +24,23 @@ Fast, safe, cost-effective DynamoDB cache backend for Django

- [django-dynamodb-cache](#django-dynamodb-cache) + - [Introduce](#introduce) - [Installation](#installation) - [Setup on Django](#setup-on-django) - [Aws credentials](#aws-credentials) - [Create cache table command](#create-cache-table-command) - [How to contribute](#how-to-contribute) +## Introduce + +This project is a cache backend using aws dynamodb. + +This is compatible with the django official cache framework. + +Did you set the boto3 permission? + +Enter the django official command createcachetable and get started easily + ## Installation ```sh @@ -51,16 +62,18 @@ INSTALLED_APPS = [ CACHES = { "default": { "BACKEND": "django_dynamodb_cache.backend.DjangoCacheBackend", - "LOCATION": "table-name", # default: django-dynamodb-cache - "TIMEOUT": 120, # seconds - "KEY_PREFIX": "django_dynamodb_cache", - "VERSION": 1, - "KEY_FUNCTION": "path.to.function", # f"{prefix}:{key}:{version}" + "LOCATION": "table-name", # (mandatory) + "TIMEOUT": 120, # (optional) seconds + "KEY_PREFIX": "django_dynamodb_cache", # (optional) + "VERSION": 1, # (optional) + "KEY_FUNCTION": "path.to.function", # (optional) f"{prefix}:{key}:{version}" "OPTIONS": { - "aws_region_name": "us-east-1", - "read_capacity_units": 1, - "write_capacity_units": 1, - "encode": "django_dynamodb_cache.encode.PickleEncode" + "aws_region_name": "us-east-1", # (optional) + "aws_access_key_id": "us-east-1", # (optional) + "aws_secret_access_key": "us-east-1", # (optional) + "read_capacity_units": 1, # (optional) + "write_capacity_units": 1, # (optional) + "encode": "django_dynamodb_cache.encode.PickleEncode" # (optional) } } }