src/Titon/Common/Traits/Cacheable.php
public function createCacheKey($keys) {
        if (is_array($keys)) {
            $key = array_shift($keys);

            if ($keys) {
                foreach ($keys as $value) {
                    if (is_array($value)) {
                        $key .= '-' . md5(json_encode($value));
                    } else if ($value) {
                        $key .= '-' . $value;
                    }
                }
            }
        } else {
            $key = $keys;
        }

        return (string) $key;
    }
public function createCacheKey($keys) {
        if (is_array($keys)) {
            $key = array_shift($keys);

            if ($keys) {
                foreach ($keys as $value) {
                    if (is_array($value)) {
                        $key .= '-' . md5(json_encode($value));
                    } else if ($value) {
                        $key .= '-' . $value;
                    }
                }
            }
        } else {
            $key = $keys;
        }

        return (string) $key;
    }
public function createCacheKey ( $ keys ) { if ( is_array ( $ keys ) ) { $ key = array_shift ( $ keys ) ; if ( $ keys ) { foreach ( $ keys as $ value ) { if ( is_array ( $ value ) ) { $ key .= '-' . md5 ( json_encode ( $ value ) ) ; } else if ( $ value ) { $ key .= '-' . $ value ; } } } } else { $ key = $ keys ; } return ( string ) $ key ; }
Generate a cache key. If an array is passed, drill down and form a key.

@param string|array $keys
@return string
Generate a cache key . If an array is passed drill down and form a key .