Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Internet > HTTP (WWW)

    django-clear-cache 0.3

    Download button

    No screenshots available
    Downloads: 86  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Randall Degges | More programs
    Public Domain / FREE
    May 1st, 2012, 08:05 GMT
    ROOT / Internet / HTTP (WWW)

     Read user reviews (0)  Refer to a friend  Subscribe

    django-clear-cache description

    A simple Django management command which clears your cache

    django-clear-cache is a Django app that makes this process as easy as running a single management command.I often find myself in situations where I need to fully clear my website's cache (memcached or whatever). Often times this is required because:

     I'm deploying new code and it will fail to run properly with my currently cached objects.
     I need to purge invalid (or old) information.
     A million other reasons.

    The standard way to clear your cache is to open up a management shell, eg:

    $ python manage.py shell
    Python 2.7.3 (default, Apr 20 2012, 22:39:59)
    [GCC 4.6.3] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    (InteractiveConsole)
    >>> from django.core.cache import cache
    >>> cache.clear()

    But obviously, this is annoying as I have to manually log into my production shell.

    django-clear-cache is a Django app that makes this process as easy as running a single management command.

    Install

    To install django-clear-cache, simply run pip install django-clear-cache and you'll get the latest version installed automatically.

    Next, modify your Django settings.py file, and add clear_cache to your INSTALLED_APPS setting:

    INSTALLED_APPS = (
     # ...
     'clear_cache',
    )


    Usage

    To clear your cache, simply run the clear_cache management command:

     python manage.py clear_cache

    Your cache has been cleared!

    NOTE: This will only (obviously) work if you've got a cache configured (eg: memcached, local memory, etc.). If you have no idea what I'm talking about, read through the official Django caching docs.

    Tests

    Build Status

    Want to run the tests? No problem:

    $ git clone git://github.com/rdegges/django-clear-cache.git
    $ cd django-clear-cache
    $ python setup.py develop
    ...
    $ python manage.py test clear_cache
    Creating test database for alias 'default'...
    .Your cache has been cleared!
    ..
    ----------------------------------------------------------------------
    Ran 3 tests in 1.007s

    OK
    Destroying test database for alias 'default'...



    Product's homepage

    Requirements:

    · Python
    · Django

      


    TAGS:

    Django management | clear cache | Django | management | cache

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM