[Jifty-commit] r3019 - in Jifty-DBI/trunk: lib/Jifty/DBI/Record

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Sun Mar 18 10:09:02 EDT 2007


Author: sterling
Date: Sun Mar 18 10:09:00 2007
New Revision: 3019

Modified:
   Jifty-DBI/trunk/   (props changed)
   Jifty-DBI/trunk/lib/Jifty/DBI/Record/Memcached.pm

Log:
 r4103 at riddle:  andrew | 2007-03-18 08:59:14 -0500
 Fixed documentation coverage for Jifty::DBI::Record::Memcached.


Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Record/Memcached.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Record/Memcached.pm	(original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Record/Memcached.pm	Sun Mar 18 10:09:00 2007
@@ -49,6 +49,12 @@
     $self->SUPER::_init(@args);
 }
 
+=head2 load_from_hash
+
+Overrides the implementation from L<Jifty::DBI::Record> to add support for caching.
+
+=cut
+
 sub load_from_hash {
     my $self = shift;
 
@@ -67,6 +73,12 @@
     }
 }
 
+=head2 load_by_cols
+
+Overrides the implementation from L<Jifty::DBI::Record> to add support for caching.
+
+=cut
+
 sub load_by_cols {
     my ( $class, %attr ) = @_;
 
@@ -252,6 +264,28 @@
     };
 }
 
+=head2 memcached_config
+
+Returns a hash containing arguments to pass to L<Cache::Memcached> during construction. The defaults are like:
+
+  (
+      services => [ '127.0.0.1:11211' ],
+      debug    => 0,
+  )
+
+You may want to override this method if you want a customized cache configuration:
+
+  sub memcached_config {
+      (
+          servers => [ '10.0.0.15:11211', '10.0.0.15:11212',
+                       '10.0.0.17:11211', [ '10.0.0.17:11211', 3 ] ],
+          debug   => 0,
+          compress_threshold => 10_000,
+      );
+  }
+
+=cut
+
 
 sub memcached_config {
     servers => ['127.0.0.1:11211'],


More information about the Jifty-commit mailing list