src/Spiritix/LadaCache/Cache.php
public function set($key, array $tags, $data)
    {
        $key = $this->redis->prefix($key);
        $this->redis->set($key, $this->encoder->encode($data));

        if (is_int($this->expirationTime) && $this->expirationTime > 0) {
            $this->redis->expire($key, $this->expirationTime);
        }

        foreach ($tags as $tag) {
            $this->redis->sadd($this->redis->prefix($tag), $key);
        }
    }
public function set($key, array $tags, $data)
    {
        $key = $this->redis->prefix($key);
        $this->redis->set($key, $this->encoder->encode($data));

        if (is_int($this->expirationTime) && $this->expirationTime > 0) {
            $this->redis->expire($key, $this->expirationTime);
        }

        foreach ($tags as $tag) {
            $this->redis->sadd($this->redis->prefix($tag), $key);
        }
    }
public function set ( $ key , array $ tags , $ data ) { $ key = $ this -> redis -> prefix ( $ key ) ; $ this -> redis -> set ( $ key , $ this -> encoder -> encode ( $ data ) ) ; if ( is_int ( $ this -> expirationTime ) && $ this -> expirationTime > 0 ) { $ this -> redis -> expire ( $ key , $ this -> expirationTime ) ; } foreach ( $ tags as $ tag ) { $ this -> redis -> sadd ( $ this -> redis -> prefix ( $ tag ) , $ key ) ; } }
Store a value for a given key in the cache.

This method does not check if there is a value available for the given key, may cause unexpected behavior if not.
Use has() to prevent this issue.

@param string $key
@param array  $tags
@param mixed  $data
Store a value for a given key in the cache .