You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the issue you are having?
We add data into bigcache, and using delete, but seems like it only set byte array with 0.
For example, in one big cache there are 111111111111 of a byte queue, and we use delete, it only make it to 111000111111
so next time we insert new data, it still add to the back of byte queue, rather than use those three bytes with 0.
Is there anyway to delete byte correctly so that the queue size would not grow or reuse 0 byte correctly?
This is working as expected and was one of the design choices we made to keep it simple. When you remove element it's not removed but marked as removed. When space is running out we overwrite removed elements. By doing this we don't have a problem with fragmentation and garbage collection. Without this assumption we will end up implementing our own GC which is probably bad idea as Go already has on.
What is the issue you are having?
We add data into bigcache, and using delete, but seems like it only set byte array with 0.
For example, in one big cache there are 111111111111 of a byte queue, and we use delete, it only make it to 111000111111
so next time we insert new data, it still add to the back of byte queue, rather than use those three bytes with 0.
Is there anyway to delete byte correctly so that the queue size would not grow or reuse 0 byte correctly?
For more information on how to provide an MCVE, please see the Stack Overflow documentation.
Environment:
/etc/os-release
or winver.exe): macosxThe text was updated successfully, but these errors were encountered: