This message was deleted.
# community-help
s
This message was deleted.
šŸ‘€ 1
e
I had a go setting up Typesense with Cloudflare last week, I had to turn proxying off to make it work
that could have been my cache rules playing up, but I haven't had time to look into it since
Cloudflare does have an API you can use to issue cache purges via Curl, you might run into issues with rate limiting and the number of URLs being purged, depending on your Cloudflare plan
n
I had to turn proxying off to make it work
Well these are my Cloudflare settings, see screenshot
Proxied by Cloudflare and... just works. Cloudflare cache settings - just default values, did no changes there...
e
I had problems issuing new API keys via Typesense Dashboard application... I'd create a search API key but when querying the server the keys would not appear in the list. Once I disabled proxying, it not only worked but all the keys I failed to see immediately appeared šŸ˜…
so maybe the default caching rules are a problem
n
Aha, there is such a thing "Typesense Dashboard application", good to know! ( I am a caveman, use command-line for Typesense management, and I do it on the machine where Typesense runs, so management request goes straight to Typesense, without Cloudflare network...) So, back to my original question: optimal Typesense/Cloudflare settings for SEARCH (from browser)?
e
Yep, I use this one: https://bfritscher.github.io/typesense-dashboard/#/. Save it offline and connect with your local instance,.You can self-host with your own project or enable CORS with that domain on your Typesense install
šŸ‘ 1
n
I think, it is time for @Jason Bosco or @Kishore Nallan to shed some light on this whole caching thing ))
k
This means: the contents of Typesesnse collection can be cached - would be great if Cloudflare caches it - to reduce load on my server.
Cloudflare caching works at an URL level. If you are making repeated queries those responses can be cached, but Typesense's own cache feature (check
use_cache
) can also do this. We also allow you to set the size of cache using a server side parameter (documented in docs).
n
Thanks @Kishore Nallan So, this approach is... not wrong: • I do not configure Typesense own cache (just keep default settings) • I configure Cloudflare to cache Any hints how to tell Cloudflare "your cache is not valid anymore" - when, after N hours, I modified Typesense collection ?
k
Not sure about that. Maybe they have some TTL option. But it's not a good idea to do this because you will lose a lot of flexibility.