Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Libraries

    filecache 0.75

    Download button

    No screenshots available
    Downloads: 218  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    ubershmekel | More programs
    BSD License / FREE
    March 20th, 2012, 02:48 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    filecache description

    Persistent caching decorator

    filecache is a Python decorator which saves the return value of functions even after the interpreter dies. For example this is useful on functions that download and parse webpages for example. All you need to do is specify for how long the return values should be cached (use seconds, like time.sleep).

    USAGE:


    from filecache import filecache

    @filecache(24 * 60 * 60)
    def time_consuming_function(args):
        # etc


    NOTE: All arguments of the decorated function and the return value need to be picklable for this to work.

    NOTE: The cache isn't automatically cleaned, it is only overwritten. If your function can receive many different arguments that rarely repeat, your cache may forever grow. One day I might add a feature that once in every 100validity scans the db for outdated stuff and erases.


    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    Python decorator | caching decorator | caching | decorator | cache

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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