user-pic

fifo11

Subscribe to feed Recent Actions from fifo11

  • Shantanu Bhadoria commented on Memcached to the rescue

    Here is the problem that I see with these caching solutions. Why write so much code to retrieve one cached value???

    my $content = $cache->get($key);
    unless ($content) {
    process_request();
    $cache->store($key, $content);
    }
    $content = $cache->get($key);

    5 lines to get one value!! Ouch!!

    I think we should have some thing on the lines of
    $result = $cache->get(subroutine(),ttl=>5 );

    The name 'subroutine()' itself should be stored as the key, and every time the ttl expires for the sub the subroutine should…

Subscribe to feed Responses to Comments from fifo11

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.