home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / tsw / TSW_3.4.0.exe / Apache2 / perl / NullCache.pm < prev    next >
Encoding:
Perl POD Document  |  2003-04-15  |  2.2 KB  |  190 lines

  1. ######################################################################
  2. # $Id: NullCache.pm,v 1.7 2002/07/18 06:15:18 dclinton Exp $
  3. # Copyright (C) 2001 Jay Sachs, 2002 DeWitt Clinton All Rights Reserved
  4. #
  5. # Software distributed under the License is distributed on an "AS
  6. # IS" basis, WITHOUT WARRANTY OF ANY KIND, either expressed or
  7. # implied. See the License for the specific language governing
  8. # rights and limitations under the License.
  9. ######################################################################
  10.  
  11.  
  12. package Cache::NullCache;
  13.  
  14. use strict;
  15. use vars qw( @ISA );
  16. use Cache::Cache qw( $EXPIRES_NOW  );
  17.  
  18. @ISA = qw ( Cache::BaseCache );
  19.  
  20.  
  21. sub Clear
  22. {
  23. }
  24.  
  25.  
  26. sub Purge
  27. {
  28. }
  29.  
  30.  
  31. sub Size
  32. {
  33.   return 0;
  34. }
  35.  
  36.  
  37. sub new
  38. {
  39.   my ( $proto ) = @_;
  40.  
  41.   return bless( {}, ref( $proto ) || $proto );
  42. }
  43.  
  44.  
  45. sub clear
  46. {
  47. }
  48.  
  49.  
  50. sub get
  51. {
  52.   return undef;
  53. }
  54.  
  55.  
  56. sub get_object
  57. {
  58.   return undef;
  59. }
  60.  
  61.  
  62. sub purge
  63. {
  64. }
  65.  
  66.  
  67. sub remove
  68. {
  69. }
  70.  
  71.  
  72. sub set
  73. {
  74. }
  75.  
  76.  
  77. sub set_object
  78. {
  79. }
  80.  
  81.  
  82. sub size
  83. {
  84.   return 0;
  85. }
  86.  
  87.  
  88. sub get_default_expires_in
  89. {
  90.   return $EXPIRES_NOW;
  91. }
  92.  
  93.  
  94. sub get_keys
  95. {
  96.   return ( );
  97. }
  98.  
  99.  
  100. sub get_identifiers
  101. {
  102.   warn( "get_identifiers has been marked deprepricated.  use get_keys" );
  103.  
  104.   return ( );
  105. }
  106.  
  107.  
  108. sub get_auto_purge_interval
  109. {
  110.   return 0;
  111. }
  112.  
  113.  
  114. sub set_auto_purge_interval
  115. {
  116. }
  117.  
  118.  
  119. sub get_auto_purge_on_set
  120. {
  121.   return 0;
  122. }
  123.  
  124.  
  125. sub set_auto_purge_on_set
  126. {
  127. }
  128.  
  129.  
  130. sub get_auto_purge_on_get
  131. {
  132.   return 0;
  133. }
  134.  
  135.  
  136. sub set_auto_purge_on_get
  137. {
  138. }
  139.  
  140.  
  141. __END__
  142.  
  143. =pod
  144.  
  145. =head1 NAME
  146.  
  147. Cache::NullCache -- implements the Cache interface.
  148.  
  149. =head1 DESCRIPTION
  150.  
  151. The NullCache class implements the Cache::Cache interface, but does
  152. not actually persist data.  This is useful when developing and
  153. debugging a system and you wish to easily turn off caching.  As a
  154. result, all calls to get and get_object will return undef.
  155.  
  156. =head1 SYNOPSIS
  157.  
  158.   use Cache::NullCache;
  159.  
  160.   my $cache = new Cache::NullCache( );
  161.  
  162.   See Cache::Cache for the usage synopsis.
  163.  
  164. =head1 METHODS
  165.  
  166. See Cache::Cache for the API documentation.
  167.  
  168. =head1 OPTIONS
  169.  
  170. See Cache::Cache for standard options.
  171.  
  172. =head1 PROPERTIES
  173.  
  174. See Cache::Cache for default properties.
  175.  
  176. =head1 SEE ALSO
  177.  
  178. Cache::Cache
  179.  
  180. =head1 AUTHOR
  181.  
  182. Original author: Jay Sachs
  183.  
  184. Last author:     $Author: dclinton $
  185.  
  186. Copyright (C) 2001 Jay Sachs, 2002 DeWitt Clinton
  187.  
  188. =cut
  189.  
  190.