Closed
Bug 460211
Opened 16 years ago
Closed 16 years ago
Implement memcache for new sumo search
Categories
(support.mozilla.org :: Knowledge Base Software, task)
support.mozilla.org
Knowledge Base Software
Tracking
(Not tracked)
RESOLVED
FIXED
0.7.3
People
(Reporter: nkoth, Assigned: lorchard)
References
Details
(Whiteboard: sumo_only)
Attachments
(1 file, 2 obsolete files)
4.66 KB,
patch
|
nkoth
:
review+
|
Details | Diff | Splinter Review |
There are already caching hooks. To attach memcache hooks and test.
Reporter | ||
Updated•16 years ago
|
Target Milestone: --- → 0.7.2
Reporter | ||
Updated•16 years ago
|
Target Milestone: 0.7.2 → 0.7.3
Comment 1•16 years ago
|
||
Les, do you have time to look at this this week?
Assignee: nobody → lorchard
Reporter | ||
Comment 2•16 years ago
|
||
This should be implemented where it is commented in /webroot/tiki-newsearch.php.
Assignee | ||
Comment 3•16 years ago
|
||
Starting to look at this, but it seems like the caching here is intended to be different than the way I've done it everywhere else so far. The memcachelib itself is really simple, so might be easier for someone more familiar with the search code to drop it in. Alternatively - are there docs somewhere on how to get this search code working? I haven't had much luck so far.
Reporter | ||
Comment 4•16 years ago
|
||
(In reply to comment #3) > Starting to look at this, but it seems like the caching here is intended to be > different than the way I've done it everywhere else so far. I suppose it will be different since we are caching search results rather than pages or things like that. > > The memcachelib itself is really simple, so might be easier for someone more > familiar with the search code to drop it in. Eric, would you have time for this? Paul, would you have time to investigate this? > > Alternatively - are there docs somewhere on how to get this search code > working? I haven't had much luck so far. Follow procedure here. bug 463708 for background Sphinx install instructions. Sphinx is required for the new search. Do this: bug 464851 User tips: Bug 460224
Comment 5•16 years ago
|
||
I'll know by the end of today what time I'll have before Tuesday. My initial thoughts would be yes, though.
Assignee | ||
Comment 6•16 years ago
|
||
I haven't gotten sphinx working for my dev instance yet, but for what it's worth if someone else with working sphinx takes a crack at this: An example of what I did with memcache can be seen at the start and end of tiki-view_forum_thread.php, buffering and caching page output. Sounds like the search caching is meant to be much finer grained to cache just results, but the basic usage of the memcachelib.php I threw together should be the same. The main tricky bit I found is if there's a need to cache results of any kind for multiple locales, and then to invalidate the caching for a whole family of results. (ie. a forum thread or wiki page for a range of locales) This might not be a concern for search results - but if it is, that's what the "meta-time" datestamp helps facilitate.
Comment 7•16 years ago
|
||
I cooked this up in a rush this morning (since sphinx and the new search work on my dev). It seems to do the trick. It caches an entire query's result array, which seems to have been the intention. A minor note, no "meta-time" checks (see above comment) are done like they are for wiki pages and forum threads. If it's a concern, it'll be easy enough to add.
Attachment #349589 -
Flags: review?(nelson)
Updated•16 years ago
|
Attachment #349589 -
Flags: review?(lorchard)
Assignee | ||
Updated•16 years ago
|
Attachment #349589 -
Flags: review?(lorchard) → review+
Assignee | ||
Comment 8•16 years ago
|
||
Comment on attachment 349589 [details] [diff] [review] Adds memcache functionality to new sphinx search Code looks good, but I've still not had a chance to get Sphinx working on my machine to run it.
Reporter | ||
Comment 9•16 years ago
|
||
Can you add an admin UI for turning on/off memcache caching for this, i.e. make the cache method a pref?
Comment 10•16 years ago
|
||
Attachment #349589 -
Attachment is obsolete: true
Attachment #350103 -
Flags: review?(nelson)
Attachment #349589 -
Flags: review?(nelson)
Comment 11•16 years ago
|
||
Attachment #350103 -
Attachment is obsolete: true
Attachment #350105 -
Flags: review?(nelson)
Attachment #350103 -
Flags: review?(nelson)
Reporter | ||
Comment 12•16 years ago
|
||
Comment on attachment 350105 [details] [diff] [review] Patched from r20266 in r20269/r20270
Attachment #350105 -
Flags: review?(nelson) → review+
Reporter | ||
Comment 13•16 years ago
|
||
I've tried it... Nothing breaks, but still waiting for search results from bug 464851 to enable more testing. As for testing of memcache itself. Laura/Stephend, how does one go about testing the "effectiveness" of memcache? Must we schedule sometime with IT? I suppose that will be bug 460216?
My experience with testing memcache (on AMO) is more or less limited to ensuring that memcache isn't holding onto things we want to display immediately; make a string change, change a graphic, etc., and ensure that the update is reflected on page load/reload. I don't know how to test it otherwise, but oremj and/or morgamic et al. would know more, for sure.
Comment 15•16 years ago
|
||
Adding oremj and morgamic. See comment 14 from Herr Donner!
Updated•15 years ago
|
Whiteboard: sumo_only
You need to log in
before you can comment on or make changes to this bug.
Description
•