From c1d37d3c5569c0a0d76c3374fa5fe2124bfb0667 Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 7 May 2008 20:39:30 +0000 Subject: [PATCH] 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 git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2_2@9523 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/WWW/AddedContent.pm | 4 +- .../perlmods/OpenILS/WWW/AddedContent/Amazon.pm | 59 ---------------------- 2 files changed, 2 insertions(+), 61 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent.pm b/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent.pm index 9ef92f7dd2..aca43824cb 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent.pm @@ -86,14 +86,14 @@ sub handler { 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); diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent/Amazon.pm b/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent/Amazon.pm index 86c19c65f5..77c6bef531 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent/Amazon.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent/Amazon.pm @@ -47,65 +47,6 @@ sub jacket_large { # -------------------------------------------------------------------------- -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 { -- 2.11.0