[otrs-cvs] GeneralCatalog/Kernel/System GeneralCatalog.pm, 1.32, 1.33

cvs-log at otrs.org cvs-log at otrs.org
Thu Mar 6 15:36:19 GMT 2008


Comments:
Update of /home/cvs/GeneralCatalog/Kernel/System
In directory lancelot:/tmp/cvs-serv8783/Kernel/System

Modified Files:
	GeneralCatalog.pm 
Log Message:
Removed useless NoCache option.

Author: mh

Index: GeneralCatalog.pm
===================================================================
RCS file: /home/cvs/GeneralCatalog/Kernel/System/GeneralCatalog.pm,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** GeneralCatalog.pm	6 Mar 2008 14:28:04 -0000	1.32
--- GeneralCatalog.pm	6 Mar 2008 15:36:14 -0000	1.33
***************
*** 190,194 ****
          Functionality => 'active',               # (optional) string or array reference
          Valid         => 0,                      # (optional) default 1
-         NoCache       => 1,                      # (optional) default 0
      );
  
--- 190,193 ----
***************
*** 237,241 ****
      # check if result is already cached
      return $Self->{Cache}->{ItemList}->{$SQL}
!         if !$Param{NoCache} && $Self->{Cache}->{ItemList}->{$SQL};
  
      # ask database
--- 236,240 ----
      # check if result is already cached
      return $Self->{Cache}->{ItemList}->{$SQL}
!         if $Self->{Cache}->{ItemList}->{$SQL};
  
      # ask database
***************
*** 257,270 ****
      }
  
!     if ( $Param{NoCache} ) {
! 
!         # reset cache
!         delete $Self->{Cache}->{ItemList}->{$SQL};
!     }
!     else {
! 
!         # cache the result
!         $Self->{Cache}->{ItemList}->{$SQL} = \%Data;
!     }
  
      return \%Data;
--- 256,261 ----
      }
  
!     # cache the result
!     $Self->{Cache}->{ItemList}->{$SQL} = \%Data;
  
      return \%Data;
***************
*** 330,334 ****
      my $ItemDataRef = $GeneralCatalogObject->ItemGet(
          ItemID  => 3,
-         NoCache => 1,  # (optional) default 0
      );
  
--- 321,324 ----
***************
*** 363,368 ****
          # check if result is already cached
          return $Self->{Cache}->{ItemGet}->{Class}->{ $Param{Class} }->{ $Param{Name} }
!             if !$Param{NoCache}
!                 && $Self->{Cache}->{ItemGet}->{Class}->{ $Param{Class} }->{ $Param{Name} };
  
          # quote
--- 353,357 ----
          # check if result is already cached
          return $Self->{Cache}->{ItemGet}->{Class}->{ $Param{Class} }->{ $Param{Name} }
!             if $Self->{Cache}->{ItemGet}->{Class}->{ $Param{Class} }->{ $Param{Name} };
  
          # quote
***************
*** 378,382 ****
          # check if result is already cached
          return $Self->{Cache}->{ItemGet}->{ItemID}->{ $Param{ItemID} }
!             if !$Param{NoCache} && $Self->{Cache}->{ItemGet}->{ItemID}->{ $Param{ItemID} };
  
          # quote
--- 367,371 ----
          # check if result is already cached
          return $Self->{Cache}->{ItemGet}->{ItemID}->{ $Param{ItemID} }
!             if $Self->{Cache}->{ItemGet}->{ItemID}->{ $Param{ItemID} };
  
          # quote
***************
*** 417,432 ****
      }
  
!     if ( $Param{NoCache} ) {
! 
!         # reset cache
!         delete $Self->{Cache}->{ItemGet}->{Class}->{ $ItemData{Class} }->{ $ItemData{Name} };
!         delete $Self->{Cache}->{ItemGet}->{ItemID}->{ $Param{ItemID} };
!     }
!     else {
! 
!         # cache the result
!         $Self->{Cache}->{ItemGet}->{Class}->{ $ItemData{Class} }->{ $ItemData{Name} } = \%ItemData;
!         $Self->{Cache}->{ItemGet}->{ItemID}->{ $Param{ItemID} } = \%ItemData;
!     }
  
      return \%ItemData;
--- 406,412 ----
      }
  
!     # cache the result
!     $Self->{Cache}->{ItemGet}->{Class}->{ $ItemData{Class} }->{ $ItemData{Name} } = \%ItemData;
!     $Self->{Cache}->{ItemGet}->{ItemID}->{ $Param{ItemID} } = \%ItemData;
  
      return \%ItemData;


More information about the cvs-log mailing list