Memory table - TTL mechanism ? #5179
Unanswered
GuillaumeBrook
asked this question in
Q&A
Replies: 1 comment
-
I think you can use this package: https://github.com/easy-swoole/cache I have done so successfully. It is based on Swoole table and has a TTL mechanism |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello there,
I'm not sure to correctly understand memory table.
Does memory table are faster than a basic array to put / get data ? I could just create a singleton class with an array as a property and use it as a basic instance cache.
Does putting the same data in an array and in a memory table use the same space in RAM ? Or maybe the data are compressed and de-compressed when using the get function ?
Is there a TTL of these tables ? For example, if I add a data with a TTL of 3600, the I try to get it in 3601 seconds, I would expect that the memory has been released and the result is null. Does a mechanism like that exists ?
Thank you in advance
Beta Was this translation helpful? Give feedback.
All reactions