Needs review
Project:
Apache Solr Views
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Aug 2010 at 15:57 UTC
Updated:
22 Feb 2017 at 13:33 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Scott Reynolds commentedPerhaps I am looking at the wrong thing. This is views_plugin_cache::get_results_key
both query and apachesolr_params aren't in there.
Does this mean we need to override get_results_key in the cache plugin?
Comment #2
mgriego commentedNo, we don't need to override get_results_key. I specifically tried to avoid that actually. The query and apachesolr_params are added to $view->build_info, which is the first element added to $key_data.
Comment #3
JeremyFrench commentedThings may have moved on a bit in views since this bugs was raised. I have had more luck adding a method
get_cache_info()to the apachesolr_views_query object.Get_results_key()now calls this and if not present it will not cache.If I get some robust code in there I'll submit a patch.
Comment #4
JeremyFrench commentedAttached is patch, first patch I have done from git so apologies if formatting is wrong.
Comment #5
JeremyFrench commentedComment #6
mgriego commentedThat looks right to me. I'll be testing that patch in our environment this week and will report back how it works.
Comment #7
mgriego commentedThis does appear to be working for us.
Comment #8
caminadaf commentedThis is not working on 7.x, a views cache plugin class needs to be implemented.
Comment #9
caminadaf commentedI took the liberty of creating the cache plugin and doing a get_cache_key for this module, since apachesolr_views' query variable is not an object, but a string.
Comment #11
caminadaf commentedI mistakenly triggered a test build, but there are no tests for this module... Moving back to review
Comment #14
miroslavbanov commentedLooks fine.
But I almost never use views cache, and I am not using this module currently, so will wait for other reviewer to RTBC.
Comment #15
caminadaf commentedUpdating the patch since the typehint broke the fix