More work on sectionable caches.

This commit is contained in:
Taylor Otwell
2012-04-28 22:46:25 -05:00
parent 31106a9211
commit aaeb7bc3be
3 changed files with 43 additions and 43 deletions

View File

@@ -1,6 +1,6 @@
<?php namespace Laravel\Cache\Drivers;
class Memcached extends Driver implements Sectionable {
class Memcached extends Sectionable {
/**
* The Memcache instance.
@@ -277,37 +277,4 @@ class Memcached extends Driver implements Sectionable {
return $section.'#'.$this->section_id($section).'#'.$key;
}
/**
* Indicates if a key is sectionable.
*
* @param string $key
* @return bool
*/
protected function sectionable($key)
{
return $this->implicit and $this->sectioned($key);
}
/**
* Determine if a key is sectioned.
*
* @param string $key
* @return bool
*/
protected function sectioned($key)
{
return str_contains($key, '::');
}
/**
* Get the section and key from a sectioned key.
*
* @param string $key
* @return array
*/
protected function parse($key)
{
return explode('::', $key, 2);
}
}