Skip to content

Commit

Permalink
fix: fix array to string error
Browse files Browse the repository at this point in the history
  • Loading branch information
pgautier404 committed Oct 12, 2023
1 parent e470bd4 commit aa073b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
php-version: '${{ matrix.php-version }}'
extensions: grpc
tools: composer:v2
ini-values: zend.assertions=1

# The next two steps exposes $DRUPAL_ROOT and $MODULE_FOLDER environment
# variables.
Expand Down
6 changes: 4 additions & 2 deletions src/MomentoCacheBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ public function set($cid, $data, $expire = CacheBackendInterface::CACHE_PERMANEN
$ttl = $this->MAX_TTL;
$item = new \stdClass();
$item->cid = $cid;
// $item->tags = implode(' ', $tags);
$item->tags = $tags;
$item->data = $data;
$item->created = round(microtime(TRUE), 3);
Expand Down Expand Up @@ -178,11 +179,12 @@ public function setMultiple(array $items)

public function delete($cid)
{
// TODO: remove this cid from tags sets? would require fetching the item and accessing the tags.
$this->getLogger('momento_cache')->debug("DELETE cid $cid from bin $this->bin");
$deleteResponse = $this->client->delete($this->cacheName, $cid);
if ($deleteResponse->asError()) {
$this->getLogger('momento_cache')->error("DELETE response error for $cid in bin $this->bin: " . $deleteResponse->asError()->message());
$this->getLogger('momento_cache')->error(
"DELETE response error for $cid in bin $this->bin: " . $deleteResponse->asError()->message()
);
} else {
$this->getLogger('momento_cache')->debug("DELETED $cid from bin $this->bin");
}
Expand Down

0 comments on commit aa073b3

Please sign in to comment.