[open-ils-commits] r9525 - in trunk/Open-ILS/src/perlmods/OpenILS/WWW: . AddedContent

svn at svn.open-ils.org svn at svn.open-ils.org
Wed May 7 16:40:16 EDT 2008


Author: erickson
Date: 2008-05-07 16:40:13 -0400 (Wed, 07 May 2008)
New Revision: 9525

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent.pm
   trunk/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent/Amazon.pm
Log:
added content handler no longer tries to pull from the cache when the plugin cannot return data for that type of call anyway.  removed Amazon stub methods because they 1. should have returned explicit undef, but more importantly because having them around means extra calls to memcache

Modified: trunk/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent/Amazon.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent/Amazon.pm	2008-05-07 20:40:03 UTC (rev 9524)
+++ trunk/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent/Amazon.pm	2008-05-07 20:40:13 UTC (rev 9525)
@@ -47,65 +47,6 @@
 
 # --------------------------------------------------------------------------
 
-sub toc_html {
-    my( $self, $key ) = @_;
-}
-
-sub toc_xml {
-    my( $self, $key ) = @_;
-}
-
-sub toc_json {
-    my( $self, $key ) = @_;
-}
-
-# --------------------------------------------------------------------------
-
-sub anotes_html {
-    my( $self, $key ) = @_;
-}
-
-sub anotes_xml {
-    my( $self, $key ) = @_;
-}
-
-sub anotes_json {
-    my( $self, $key ) = @_;
-}
-
-
-# --------------------------------------------------------------------------
-
-sub excerpt_html {
-    my( $self, $key ) = @_;
-}
-
-sub excerpt_xml {
-    my( $self, $key ) = @_;
-}
-
-sub excerpt_json {
-    my( $self, $key ) = @_;
-}
-
-# --------------------------------------------------------------------------
-
-sub reviews_html {
-    my( $self, $key ) = @_;
-}
-
-# we have to aggregate the reviews
-sub reviews_xml {
-    my( $self, $key ) = @_;
-}
-
-
-sub reviews_json {
-    my( $self, $key ) = @_;
-}
-
-# --------------------------------------------------------------------------
-
 sub send_img {
     my($self, $response) = @_;
     return { 

Modified: trunk/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent.pm	2008-05-07 20:40:03 UTC (rev 9524)
+++ trunk/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent.pm	2008-05-07 20:40:13 UTC (rev 9525)
@@ -86,14 +86,14 @@
     child_init() unless $handler;
 
     return Apache2::Const::NOT_FOUND unless $handler and $type and $format and $key;
-    return $res if defined($res = $AC->serve_from_cache($type, $format, $key));
-    return Apache2::Const::NOT_FOUND unless $AC->lookups_enabled;
 
     my $err;
     my $data;
     my $method = "${type}_${format}";
 
     return Apache2::Const::NOT_FOUND unless $handler->can($method);
+    return $res if defined($res = $AC->serve_from_cache($type, $format, $key));
+    return Apache2::Const::NOT_FOUND unless $AC->lookups_enabled;
 
     try {
         $data = $handler->$method($key);



More information about the open-ils-commits mailing list