servers => [ $servers ],
debug => 0,
compress_threshold => 10_000,
+ expire_time => 600,
namespace => $ENV{'MEMCACHED_NAMESPACE'} || 'koha'
});
# Verify memcached available (set a variable and test the output)
return $koha; # Return value: ref-to-hash holding the configuration
}
+=head2 ismemcached
+
+Returns the value of the $ismemcached variable (0/1)
+
+=cut
+
+sub ismemcached {
+ return $ismemcached;
+}
+
+=head2 memcached
+
+If $ismemcached is true, returns the $memcache variable.
+Returns undef otherwise
+
+=cut
+
+sub memcached {
+ if ($ismemcached) {
+ return $memcached;
+ } else {
+ return undef;
+ }
+}
+
# db_scheme2dbi
# Translates the full text name of a database into de appropiate dbi name
#