<?php namespace Clean\Repository\CacheAdapter;

use Clean\Repository\CacheAdapterInterface;
use Metaphore\Cache;

class Metaphore implements CacheAdapterInterface
{
    /**
     * @var Cache
     */
    private $backend;

    /**
     * @param Cache $backend
     */
    public function __construct(Cache $backend, $prefix = '')
    {
        $this->backend = $backend;
        $this->prefix = $prefix;
    }

    /**
     * @see CacheAdapterInterface::cache()
     */
    public function cache($key, callable $callable, $ttl)
    {
        return $this->backend->cache($this->prefix.$key, $callable, $ttl);
    }
}

<?php namespace Clean\Repository\CacheAdapter;

use Clean\Repository\CacheAdapterInterface;
use Metaphore\Cache;

class Metaphore implements CacheAdapterInterface
{
    /**
     * @var Cache
     */
    private $backend;

    /**
     * @param Cache $backend
     */
    public function __construct(Cache $backend)
    {
        $this->backend = $backend;
    }

    /**
     * @see CacheAdapterInterface::cache()
     */
    public function cache($key, callable $callable, $ttl)
    {
        return $this->backend->cache($key, $callable, $ttl);
    }
}

--- 
+++ 
@@ -13,9 +13,10 @@
     /**
      * @param Cache $backend
      */
-    public function __construct(Cache $backend)
+    public function __construct(Cache $backend, $prefix = '')
     {
         $this->backend = $backend;
+        $this->prefix = $prefix;
     }
 
     /**
@@ -23,6 +24,6 @@
      */
     public function cache($key, callable $callable, $ttl)
     {
-        return $this->backend->cache($key, $callable, $ttl);
+        return $this->backend->cache($this->prefix.$key, $callable, $ttl);
     }
 }
Support for prefixing of cache keys
