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

    Cache::Static 0.9905

    Download button

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

    License / Price:

    Last Updated:

    Category:
    Brian Szymanski | More programs
    Perl Artistic License / FREE
    May 28th, 2007, 20:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Cache::Static description

    Cache::Static is a Perl module used for caching without freshness concerns.

    Cache::Static is a Perl module used for caching without freshness concerns.

    SYNOPSIS

    HTML::Mason instructions

    In handler.pl: use Cache::Static;

    In any component you where you have a well defined set of dependencies which change the output:

    < %init >
    my $_cs_deps = [
    #file dependencies - only regenerate if a file has changed
    'file|/path/to/some_configuration_file',

    #DBI dependencies - still under development - WONT WORK
    #DBI dependencies: note the third argument is a DSN
    '_DBI|table|mysql:scache_test_db|test_table',
    '_DBI|db|mysql:scache_test_db',

    #not yet implemented:
    #column level depends, e.g. "DBI|column|$dsn|$tablename|$columname"
    #row depends, e.g. "DBI|row|$dsn|$tablename|$uid_column_name|$uid_value"

    #XML::Comma dependencies - only regenerate if a Doc or Store has changed
    "_XML::Comma|Doc|$doc_key",
    "_XML::Comma|Store|$def|$store",

    #time dependencies (WARNING: these are discouraged, see doc/NOTE-time-deps)
    'time|15s', #every 15 seconds
    'time|M:15s', #every 15 seconds after the minute
    'time|H:2m', #every 2 minutes past the hour
    'time|W:2d3h5m0s', #every Tuesday at 3:05 AM

    #modifiers (indicate behavior when the file cannot be found)
    'file-0|/tmp/foo', #if ! -e /tmp/foo, regenerate
    'file-1|/tmp/foo', #if ! -e /tmp/foo, serve
    'file|/tmp/foo', #use config value "dep_file_not_found_returns"

    #note modifiers also work on extensions, e.g.
    '_DBI-1|db|mysql:scache_test_db',
    '_XML::Comma-0|Store|mm_item|post',

    #etc... but modifiers CANNOT be used with times (since they have no
    #file backing on disk)
    ];

    #whatever you have in $_cs_deps above...
    return if Cache::Static::HTML_Mason_Util::cache_it($r, $m, 1, $_cs_deps);

    #...
    #rest of init block
    #...
    < /%init >

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    static caching | Perl caching | Perl module | Cache::Static | static | caching

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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