Skip to content

Axilent/Django-CloudFront

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Django CloudFront

Django Cloudfront is a django cache backend that uses AWS Cloudfront (an AWS integrated CDN) as a backend.

Warning: Early stages of development.

Recently AWS announced they were reducing the minimum TTL for Cloudfront. This makes CloudFront suitable to be an arbitrary, industrial strength caching mechanism. Creating a new caching backend means Django apps that use the built-in caching framework will be able to use CloudFront without further modification to Django apps.

Requirements

  • Boto: A Python interface to AWS.
  • Django: The Python-based web framework for which this cache plugin is made, thus, the point.
  • wsgiref: The reference implementation of the WSGI standard.

Required Settings

  • CLOUDFRONT_BUCKET: The name of the AWS CloudFront bucket to use.
  • AWS_ACCESS_KEY_ID: The access key id for your AWS account.
  • AWS_SECRET_ACCESS_KEY: The secret access key for your AWS account.

Installation

First set up AWS CloudFront. Have a look at the AWS Documentation. Make sure you have set the required settings (above) appropriately.

In settings.py, set your cache backend like so:

CACHES = {
	'default':{
		'BACKEND':'axilent.cache.cloudfront.CloudFrontCache'
	},
}

About

A Django cache backend that uses AWS CloudFront

Resources

Stars

3 stars

Watchers

2 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors