File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/phpFastCache/Drivers/Couchbase Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ protected function driverWrite(CacheItemInterface $item)
7878 * Check for Cross-Driver type confusion
7979 */
8080 if ($ item instanceof Item) {
81- return $ this ->getBucket ()->upsert ($ item ->getKey (), $ this ->encode ($ this ->driverPreWrap ($ item )), ['expiry ' => $ item ->getTtl ()]);
81+ return $ this ->getBucket ()->upsert (md5 ( $ item ->getKey () ), $ this ->encode ($ this ->driverPreWrap ($ item )), ['expiry ' => $ item ->getTtl ()]);
8282 } else {
8383 throw new \InvalidArgumentException ('Cross-Driver type confusion detected ' );
8484 }
@@ -94,7 +94,7 @@ protected function driverRead(CacheItemInterface $item)
9494 /**
9595 * CouchbaseBucket::get() returns a CouchbaseMetaDoc object
9696 */
97- return $ this ->decode ($ this ->getBucket ()->get ($ item ->getKey ())->value );
97+ return $ this ->decode ($ this ->getBucket ()->get (md5 ( $ item ->getKey () ))->value );
9898 } catch (\CouchbaseException $ e ) {
9999 return null ;
100100 }
@@ -111,7 +111,7 @@ protected function driverDelete(CacheItemInterface $item)
111111 * Check for Cross-Driver type confusion
112112 */
113113 if ($ item instanceof Item) {
114- return $ this ->getBucket ()->remove ($ item ->getKey ());
114+ return $ this ->getBucket ()->remove (md5 ( $ item ->getKey () ));
115115 } else {
116116 throw new \InvalidArgumentException ('Cross-Driver type confusion detected ' );
117117 }
You can’t perform that action at this time.
0 commit comments