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
return$this->traceFunction('cache.get_item', function () use ($key, $callback, $beta, &$metadata) {
46
-
if (!$this->decoratedAdapterinstanceof CacheInterface) {
47
-
thrownew \BadMethodCallException(\sprintf('The %s::get() method is not supported because the decorated adapter does not implement the "%s" interface.', self::class, CacheInterface::class));
return$this->traceFunction('cache.get_item', function () use ($key, $callback, $beta, &$metadata) {
44
-
if (!$this->decoratedAdapterinstanceof CacheInterface) {
45
-
thrownew \BadMethodCallException(\sprintf('The %s::get() method is not supported because the decorated adapter does not implement the "%s" interface.', self::class, CacheInterface::class));
return$this->traceFunction('cache.get_item', function () use ($key, $callback, $beta, &$metadata) {
45
-
if (!$this->decoratedAdapterinstanceof CacheInterface) {
46
-
thrownew \BadMethodCallException(\sprintf('The %s::get() method is not supported because the decorated adapter does not implement the "%s" interface.', self::class, CacheInterface::class));
return$this->traceFunction('cache.get_item', function () use ($key): CacheItem {
42
+
return$this->traceFunction('cache.get', function () use ($key): CacheItem {
42
43
return$this->decoratedAdapter->getItem($key);
43
44
}, $key);
44
45
}
@@ -48,7 +49,7 @@ public function getItem($key): CacheItem
48
49
*/
49
50
publicfunctiongetItems(array$keys = []): iterable
50
51
{
51
-
return$this->traceFunction('cache.get_items', function () use ($keys): iterable {
52
+
return$this->traceFunction('cache.get', function () use ($keys): iterable {
52
53
return$this->decoratedAdapter->getItems($keys);
53
54
});
54
55
}
@@ -58,7 +59,7 @@ public function getItems(array $keys = []): iterable
58
59
*/
59
60
publicfunctionclear(string$prefix = ''): bool
60
61
{
61
-
return$this->traceFunction('cache.clear', function () use ($prefix): bool {
62
+
return$this->traceFunction('cache.flush', function () use ($prefix): bool {
62
63
return$this->decoratedAdapter->clear($prefix);
63
64
}, $prefix);
64
65
}
@@ -68,7 +69,7 @@ public function clear(string $prefix = ''): bool
68
69
*/
69
70
publicfunctiondelete(string$key): bool
70
71
{
71
-
return$this->traceFunction('cache.delete_item', function () use ($key): bool {
72
+
return$this->traceFunction('cache.remove', function () use ($key): bool {
72
73
if (!$this->decoratedAdapterinstanceof CacheInterface) {
73
74
thrownew \BadMethodCallException(\sprintf('The %s::delete() method is not supported because the decorated adapter does not implement the "%s" interface.', self::class, CacheInterface::class));
74
75
}
@@ -92,7 +93,7 @@ public function hasItem($key): bool
92
93
*/
93
94
publicfunctiondeleteItem($key): bool
94
95
{
95
-
return$this->traceFunction('cache.delete_item', function () use ($key): bool {
96
+
return$this->traceFunction('cache.remove', function () use ($key): bool {
96
97
return$this->decoratedAdapter->deleteItem($key);
97
98
}, $key);
98
99
}
@@ -102,7 +103,7 @@ public function deleteItem($key): bool
102
103
*/
103
104
publicfunctiondeleteItems(array$keys): bool
104
105
{
105
-
return$this->traceFunction('cache.delete_items', function () use ($keys): bool {
106
+
return$this->traceFunction('cache.remove', function () use ($keys): bool {
if (!$this->decoratedAdapterinstanceof CacheInterface) {
238
+
thrownew \BadMethodCallException(\sprintf('The %s::get() method is not supported because the decorated adapter does not implement the "%s" interface.', self::class, CacheInterface::class));
239
+
}
240
+
$parentSpan = $this->hub->getSpan();
241
+
242
+
// If we don't have a parent span we can just forward it.
return$this->traceFunction('cache.get_item', function () use ($key, $callback, $beta, &$metadata) {
47
-
if (!$this->decoratedAdapterinstanceof CacheInterface) {
48
-
thrownew \BadMethodCallException(\sprintf('The %s::get() method is not supported because the decorated adapter does not implement the "%s" interface.', self::class, CacheInterface::class));
return$this->traceFunction('cache.get_item', function () use ($key, $callback, $beta, &$metadata) {
45
-
if (!$this->decoratedAdapterinstanceof CacheInterface) {
46
-
thrownew \BadMethodCallException(\sprintf('The %s::get() method is not supported because the decorated adapter does not implement the "%s" interface.', self::class, CacheInterface::class));
0 commit comments