Code Duplication    Length = 9-10 lines in 2 locations

Sources/CacheAPI-zend.php 2 locations

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