#community-help

Discussing `use_cache` and `cacheSearchResultsForSeconds` Options

TLDR Aljosa wanted a confirmation for a technical issue and Jason suggested to use use_cache for both. Proposed updates were given to check if their issue resolves. Aljosa agreed to test out the proposed solution.

Powered by Struct AI

1

1

Feb 15, 2022 (21 months ago)
Aljosa
Photo of md5-6bb7313b20c5179141d6908d6c09b2d5
Aljosa
04:55 PM
I think the first one is right, would love a confirmation though ๐Ÿ™‚
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
05:28 PM
Oh hmm, it should be use_cache for both
05:29
Jason
05:29 PM
May I know how you generated the request that uses usecache?
Aljosa
Photo of md5-6bb7313b20c5179141d6908d6c09b2d5
Aljosa
06:51 PM
Jason here you go. Suprisingly the cacheSearchResultsForSeconds does not work here either, maybe a side effect of some kind.
06:52
Aljosa
06:52 PM
We are using the typesense instant search adapter as well in other scenarios
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:52 PM
cacheSearchResultsForSeconds is actually client-side caching. Wherease use_cache is server-side caching
06:53
Jason
06:53 PM
Will fix that

1

Aljosa
Photo of md5-6bb7313b20c5179141d6908d6c09b2d5
Aljosa
06:54 PM
Indeed ๐Ÿ™‚ , we want both client and server side but it's only working on the multi-search queries
07:08
Aljosa
07:08 PM
Thank you Jason!๐Ÿ‘Œ ๐Ÿ‘Œ
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:33 PM
Aljosa Could you update typesense-instantsearch-adapter to 2.3.1-0 and if you have a direct dependency on typesense-js, could you update it to 1.1.4-3 and try now?
Feb 18, 2022 (21 months ago)
Aljosa
Photo of md5-6bb7313b20c5179141d6908d6c09b2d5
Aljosa
05:16 PM
Hey Jason, we'll be trying this out today and will report back with results ๐Ÿ™‚

1