teaminmedias-pluswerk / ke_search

Search Extension for TYPO3 Content Management System, including faceting search functions.
https://extensions.typo3.org/extension/ke_search/
GNU General Public License v3.0
35 stars 62 forks source link

SearchboxPlugin cacheable? #420

Closed ste101 closed 3 years ago

ste101 commented 3 years ago

Is it neccessary that the SearchboxPlugin is USER_INT? This prevents all pages with the search field from being cached especially when using StaticFileCache.

christianbltr commented 3 years ago

The searchbox plugin renders the filters differently according to the given searchword or already given filters (it shows only filter options with hits and it shows how many hits are there). So the plugin cannot be cached.

Although if you include the search plugin a page and then show the results on another result page then the search plugin could be cached since it always shows the initial state.

Do you really need to include the search plugin? You could also include the the search form with html, but this will not render any filters: https://docs.typo3.org/p/teaminmedias-pluswerk/ke_search/master/en-us/Templating/Searchbox.html

ste101 commented 3 years ago

Thank you for your answer. I don't like the HTML aproach because everything is hard coded. What about an additional simple search form which could be cached? I could try to make a patch.

christianbltr commented 3 years ago

Yes, that could be a way.

Maybe it's possible to just add another searchbox plugin which is cacheable by registering a plugin in ext_localconf.php which points to the same userFunc as pi1 but is registered as "cacheable" with addPItoST43.

I would expect it to work exactly the same with the only difference that it is cached. This should be made clear in the naming of the plugin and in the documentation.