On Mon, Nov 7, 2011 at 8:45 PM, Marvin Humphrey <[email protected]> wrote:
> However, Query objects have a to_string() method you may be able to make use
> of:
>
>    if ($method eq 'top_docs') {
>        my $args = thaw($buf)
>        my $key = $args->{query}->to_string;
>        if (is_cached($key)) {
>            $response = read_cached_object($key);
>        }
>        else {
>            $response = $dispatch{$method}->( $self, $args );
>        }
>    }
...
> The only individual task which it could conceivably make sense to cache would
> be top_docs().
...
> I understand why you want to do this: it allows you to invalidate chunks of 
> the
> cache piecemeal as individual nodes move forwards, rather than invalidate the
> whole cache whenever any one of the nodes changes.  Hopefully caching
> top_docs() alone will help.

Thanks for the considered response.  The detail you have provided is
very useful.  I'll give it a go and see how it goes.

Can you think of any unexpected issues which might arise from caching
top_docs() and not other elements of a search transaction?

thanks

Reply via email to