Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

Cache::Adaptive::ByLoad
Automatically adjusts the cache lifetime by load

Cache::Adaptive::ByLoad - Automatically adjusts the cache lifetime by load


NAME

Cache::Adaptive::ByLoad - Automatically adjusts the cache lifetime by load


SYNOPSIS


  use Cache::Adaptive::ByLoad;

  use Cache::FileCache;

  my $cache = Cache::Adaptive::ByLoad->new({

    backend => Cache::FileCache->new({

      namespace => 'cache_adaptive',

    }),

  });

  

  ...

  

  print "Content-Type: text/html\n\n";

  print $cache->access({

    key     => $uri,

    builder => sub {

      # your HTML build logic here

      $html;

    },

  });


DESCRIPTION

Cache::Adaptive::ByLoad is a subclass of the Cache::Adaptive manpage. The module adjusts cache lifetime by two factors; the load average of the platform and the percentage of the total time spent by the builder. In other words, the module tries to utilize the cache for bottlenecks under heavy load.


METHODS

new

Constructor. Takes a hashref of properties.


PROPERTIES

Cache::Adaptive::ByLoad defines two properties in addition to the properties defined by the Cache::Adaptive manpage.

load_factor

target_loadavg


SEE ALSO

the Cache::Adaptive manpage


AUTHOR

Copyright (c) 2007 Cybozu Labs, Inc. All rights reserved.

written by Kazuho Oku <kazuhooku@gmail.com>


LICENSE

This program is free software; you can redistribute it and/or modify it under t he same terms as Perl itself.

See http://www.perl.com/perl/misc/Artistic.html

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy