.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Cache::SharedMemoryCache 3pm" .TH Cache::SharedMemoryCache 3pm "2022-06-30" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Cache::SharedMemoryCache \-\- extends the MemoryCache. .SH "DESCRIPTION" .IX Header "DESCRIPTION" The SharedMemoryCache extends the MemoryCache class and binds the data store to shared memory so that separate process can use the same cache. .PP The official recommendation is now to use FileCache instead of SharedMemoryCache. The reasons for this include: .PP 1) FileCache provides equal or better performance in all cases that we've been able to test. This is due to all modern \s-1OS\s0's ability to buffer and cache file system accesses very well. .PP 2) FileCache has no real limits on cached object size or the number of cached objects, whereas the SharedMemoryCache has limits, and rather low ones at that. .PP 3) FileCache works well on every \s-1OS,\s0 whereas the SharedMemoryCache works only on systems that support IPC::ShareLite. And IPC::ShareLite is an impressive effort \*(-- but think about how hard it is to get shared memory working properly on *one* system. Now imagine writing a wrapper around shared memory for many operating systems. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Cache::SharedMemoryCache; \& \& my %cache_options_= ( \*(Aqnamespace\*(Aq => \*(AqMyNamespace\*(Aq, \& \*(Aqdefault_expires_in\*(Aq => 600 ); \& \& my $shared_memory_cache = \& new Cache::SharedMemoryCache( \e%cache_options ) or \& croak( "Couldn\*(Aqt instantiate SharedMemoryCache" ); .Ve .SH "METHODS" .IX Header "METHODS" See Cache::Cache for the \s-1API\s0 documentation. .SH "OPTIONS" .IX Header "OPTIONS" See Cache::Cache for the standard options. .SH "PROPERTIES" .IX Header "PROPERTIES" See Cache::Cache for the default properties. .SH "SEE ALSO" .IX Header "SEE ALSO" Cache::Cache, Cache::MemoryCache .SH "AUTHOR" .IX Header "AUTHOR" Original author: DeWitt Clinton .PP Last author: \f(CW$Author:\fR dclinton $ .PP Copyright (C) 2001\-2003 DeWitt Clinton