From 6086703d49557c12f05a92f12f5fd0bcb563fceb Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 22 Jul 2008 04:09:04 +0000 Subject: [PATCH] Apparently, any item or sku caching causes Apache to die. At this point, both the itemCache in the Cart and the skuCache in the CartItem have been removed. --- lib/WebGUI/Shop/Cart.pm | 8 -------- lib/WebGUI/Shop/CartItem.pm | 1 - 2 files changed, 9 deletions(-) diff --git a/lib/WebGUI/Shop/Cart.pm b/lib/WebGUI/Shop/Cart.pm index 3ad78a96b..114712dd0 100644 --- a/lib/WebGUI/Shop/Cart.pm +++ b/lib/WebGUI/Shop/Cart.pm @@ -37,7 +37,6 @@ These subroutines are available from this package: readonly session => my %session; private properties => my %properties; private error => my %error; -private itemCache => my %itemCache; private addressBookCache => my %addressBookCache; #------------------------------------------------------------------- @@ -191,7 +190,6 @@ sub delete { my ($self) = @_; $self->empty; $self->session->db->write("delete from cart where cartId=?",[$self->getId]); - #delete $itemCache{ref $self}; return undef; } @@ -208,7 +206,6 @@ sub empty { foreach my $item (@{$self->getItems}) { $item->remove; } - #$itemCache{ref $self} = {}; } #------------------------------------------------------------------- @@ -300,11 +297,7 @@ sub getItem { WebGUI::Error::InvalidParam->throw(error=>"Need an itemId."); } my $id = ref $self; - #if (exists $itemCache{$id}{$itemId}) { - #return $itemCache{$id}{$itemId}; - #} my $item = WebGUI::Shop::CartItem->new($self, $itemId); - #$itemCache{$id}{$itemId} = $item; return $item; } @@ -633,7 +626,6 @@ sub www_removeItem { my $self = shift; my $item = $self->getItem($self->session->form->get("itemId")); $item->remove; - #delete $itemCache{ref $self}{$item->getId}; return $self->www_view; } diff --git a/lib/WebGUI/Shop/CartItem.pm b/lib/WebGUI/Shop/CartItem.pm index 0e81cc204..ab0ef2ac1 100644 --- a/lib/WebGUI/Shop/CartItem.pm +++ b/lib/WebGUI/Shop/CartItem.pm @@ -100,7 +100,6 @@ Removes this item from the cart without calling $sku->onRemoveFromCart which wou sub delete { my $self = shift; $self->cart->session->db->deleteRow("cartItem","itemId",$self->getId); - #undef $self; return undef; }