API & Caching
Options
![Knight](https://us.v-cdn.net/6037124/user_avatars/1481970.jpg)
Knight
Member ✭
I have xano db api endpoint that shows the results sort by random, I was wondering can I cache this random results with user id?
so that every time when the same person query, the sort results (sort randomly) is the same
so that every time when the same person query, the sort results (sort randomly) is the same
Comments
-
yes absolutely - you can enable caching on each api request.
[Screenshot_2021-07-19_23-44-07.png] -
do we need to handle invalidate the cache ourself? or any update on the record will invalidate the cache?
-
the response cache is invalidated based on the TTL which is in seconds.
if you want more fine grained control (but more steps), then you can hand roll your own method using the data caching section in the function stack.
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