Hi. I am in the middle of upgrading our project from v1.2 to v2.0.3 of the PHP SDK.
I am having an issue with CAS tokens. In v1.2 they appear to be integers, for example: 1008175711484384512. In v2.0.3 they now appear to be a resource, example: Resource id #202. When using get_resource_type() on the resource it returns: CouchbaseCAS.
Is there any way to work with the resource (CouchbaseCAS) to get the same value as the old SDK?
Due to the fact that PHP is not capable of representing large 64-bit integers, we were forced in a lot of cases to returns strings and parse strings, this incurred a significant performance penalty. Since CAS values are not intended to be manipulated or stored for any period of time beyond the actively executing script, we decided to expose it as a resource instead (which internally is a 64-bit integer pointer).
Hi, I am facing the same issue and I need CAS value for temporary storage. I use this value for notifying user if they are updating outdated version of document.
Is there at all any way out to this? Is there any other way to store version?
I have the same problem, I want to get a Couchbase document (JSON document) with a PHP API and pass all the information, including the appropriate CAS (type cast because there is no resource type in AngularJS), to the front-end (AngularJS). Then make some operations and return it to the PHP API to store it in database. For sure, I want to check the correct CAS to avoid some concurrency problems.