Session?
Options
![Joe Thong](https://us.v-cdn.net/6037124/user_avatars/1398509.jpg)
Joe Thong
Member ✭
Hi
I would like to set some cookies with a session id in the frontend, is there any best practice to store the session key and value in xano database?
can I set a TTL in the session table and the database will auto prune it periodically? If not, does xano has a scheduler to trigger jobs that can delete them ?
Regards
Joe
I would like to set some cookies with a session id in the frontend, is there any best practice to store the session key and value in xano database?
can I set a TTL in the session table and the database will auto prune it periodically? If not, does xano has a scheduler to trigger jobs that can delete them ?
Regards
Joe
Comments
-
OK Nevermind, i decided not to use a table to do that, instead I opted for the cache service from m3o.com
This is the CURL that they gave us
curl "https://api.m3o.com/v1/cache/Set" -XPOST -H "Authorization: Bearer INSERT_YOUR_TOKEN_HERE" -D '{
"key": "",
"ttl": 0,
"value": ""
}'
It seems like I can't import this into Xano using the "Import CURL" feature.
This is what I get
[CleanShot 2021-06-19 at 05.00.20@2x.png]
It seems like Xano could not import the JSON code, maybe its because of the newlines?
Any help would be much appreciated.
Thanks
Joe -
Hey Joe,
It looks like the CURL importer got tripped up on your command line. Manually change the ENUM method on your request to POST and it should fix your issue. -
Hi Thanks Sean! why enum though? i imported the json manually and it worked. Is this a valid method?
[image.png]
Related question, is there a templating semantic to get xano to replace $remote_ip with the value of $remote_ip? something like {$remote_ip}
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