File: Null.pm

package info (click to toggle)
libtext-micromason-perl 2.10-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 648 kB
  • ctags: 196
  • sloc: perl: 3,192; makefile: 19
file content (70 lines) | stat: -rw-r--r-- 1,280 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package Text::MicroMason::Cache::Null;

use strict;

######################################################################

sub new { my $class = shift; bless { @_ }, $class }

sub get { return }

sub set { return $_[2] }

sub clear { return }

######################################################################

1;

__END__

######################################################################

=head1 NAME

Text::MicroMason::Cache::Null - Trivial Cache with No Data Storage


=head1 DESCRIPTION

This trivial cache class supports the cache interface but doesn't store or retrieve any values. 

=head2 Public Methods

=over 4

=item new()

  $cache = Text::MicroMason::Cache::Null->new();

=item get()

  undef = $cache->get( $key );

Does nothing.

=item set()

  $cache->set( $key, $value );

Returns the provided value.

=item clear()

  $cache->clear();

Does nothing.

=back


=head1 SEE ALSO

For uses of this cache class, see L<Text::MicroMason::ExecuteCache>.

Additional cache classes are available in the Text::MicroMason::Cache:: namespace, or select other caching modules on CPAN that support the interface described in L<Cache::Cache>.

For distribution, installation, support, copyright and license 
information, see L<Text::MicroMason::Docs::ReadMe>.

=cut