Open mavidser opened 5 years ago
Reading through the code, it looks like Release() checks if len(s.data) == 0 { return nil }
So, if I just had one key which I deleted, it doesn't get persisted.
Same case for Flush()
too probably; unless, I have the wrong idea of what Flush()
is supposed to do.
This issue seems to be a thing among other providers too. If confirmed, I can probably start working on a PR in the coming week.
Thanks for the feedback!
I think you're right, probably just remove code block that checks for len(s.data) == 0
?
Flush()
is meant to remove every key but still need to wait until Release
to save to its persistent location.
memory provider works fine, but if I use mysql - it basically seems to be a no-op with no queries executed. The session is changed in memory, but doesn't write to the database.
Currently using Set('key', '') and Destory(ctx) to perform these operations, but doesn't seem to be the right way.