Code Duplication    Length = 9-10 lines in 2 locations

Sources/CacheAPI-zend.php 2 locations

@@ 40-49 (lines=10) @@
37
	/**
38
	 * {@inheritDoc}
39
	 */
40
	public function getData($key, $ttl = null)
41
	{
42
		$key = $this->prefix . strtr($key, ':/', '-_');
43
44
		// Zend's pricey stuff.
45
		if (function_exists('zend_shm_cache_fetch'))
46
			return zend_shm_cache_fetch('SMF::' . $key);
47
		elseif (function_exists('output_cache_get'))
48
			return output_cache_get($key, $ttl);
49
	}
50
51
	/**
52
	 * {@inheritDoc}
@@ 54-62 (lines=9) @@
51
	/**
52
	 * {@inheritDoc}
53
	 */
54
	public function putData($key, $value, $ttl = null)
55
	{
56
		$key = $this->prefix . strtr($key, ':/', '-_');
57
58
		if (function_exists('zend_shm_cache_store'))
59
			return zend_shm_cache_store('SMF::' . $key, $value, $ttl);
60
		elseif (function_exists('output_cache_put'))
61
			return output_cache_put($key, $value);
62
	}
63
64
	/**
65
	 * {@inheritDoc}