Skip to content

Store complex data safely in cookie using a CACHE_BACKEND as a storage

Notifications You must be signed in to change notification settings

hint/django-cached-cookie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Not ready for production yet!

Goals:

  1. Easy storing of a cookie:
>>> import cached_cookie
>>> data = {'lorem': 'ipsum dolor sit amet'}
>>> cached_cookie.set(request, key, data)
  1. Easy retrieval of the cookie:
>>> import cached_cookie
>>> data = cached_cookie.get(request, key)
>>> data
{'lorem': 'ipsum dolor sit amet'}

Things to have in mind: * http://uts.cc.utexas.edu/~rmyers/pycookie/ already exists - maybe it offers a better implementation after all? * proper exception handling? guessing if a Django ORM object (therefore built in serialization)?

About

Store complex data safely in cookie using a CACHE_BACKEND as a storage

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published