How do I invalidate response cache?
Options
![pete letkeman](https://us.v-cdn.net/6037124/user_avatars/5524134.jpg)
pete letkeman
Member ✭
I like that I can cache responses, but sometimes I need to delete/add/edit a record which invalidates the cache, but the cache does not refresh until TTL runs out.
How do I invalidate a response cache?
How do I invalidate a response cache?
Comments
-
You can't invalidate an existing cached response, but you can add a cache busting input argument.
For example, you could keep a version counter that changes when you want to guarantee a new fresh result.
/api/test?v=1
/api/test?v=2
/api/test?v=3 -
Okay, yeah I see what I could do, thanks.👍
-
@Sean Montgomery Thank you Sean.
I am trying to implement this at the moment and I was wondering if you could provide more details as to how to implement this?
I am familiar with Xano's basics and I have an initial understanding of what you are suggesting. However, I'd appreciate it if you can provide some brief steps to elaborate a bit.
For instance,
- Do I need to create a certain input field? Is this then checked within the function or is the change in the endpoint URL by itself is enough?
- What's a good practical way to make sure it does reset and that the v is not previously used?
Many thanks!
-
@Abdulrahman Hariri Yeah, you need to use an Input to do that.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback