-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix new cache instance cannot clean expired cache item #1
base: master
Are you sure you want to change the base?
Conversation
@Geolim4 is there a chance that this will be merged? |
Hello, This PR needs to be reworked as data serialisation is mandatory to make the driver the more interoperable as possible. Some object could not be natively stored to RavenDb without being serialized. If you don't need serialized data, there's an option to disable it already:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just fix the deserialization part of code
Hi, how would you like to rework it? and what do you mean by fix deserialization part of code? do you always want to serialize the data ? the issue I was getting while using the extension, is that if I disable the serialize of data using the config you mentioned, it will save the document not serialized which is fine, but on load, inside the RavenDB Client it will create the entity by using the I think need to get rid of the |
I can confirm you that new cache instance is working well with data created by Phpfastcache, you should no share the same "bucket" of Phpfastcache with other applications as, effectively, stored data wont be the same. Phpfastcache does not only store "data" values, but many metadata: Tags, creation date, update date, expiration date, etc. So unless you provide me a more explicit case, I will probably close this issue for now. |
@Geolim4 I am not sure what is "more explicit case", since I provided you a failing test in this PR, but I will try.
|
When starting a new cache instance, with already cached item in ravendb, we would get a error.
That was happening because after loading the document from ravendb, in the php client we would create an entity from document that was returned from ravendb server, and it would use the
RavenProxy
constructor with$serializeData = true
and this would create the entity with wrong data indata
field, since theserialize($data)
was used. So instead ofdata: "First product"
we would getdata: "s:13:"FirstProduct"
. Then when we try to delete this document, we would get an exception since the tracked entity is changed.