private function cache(string $key, string $value, int $cacheTime = null)
    {
        try {
            $this->client->set($key, $value);

            if ($cacheTime !== null) {
                $this->client->expire($key, $cacheTime);
            }
        } catch (\Exception $e) {
            // We don't want exceptions in accessing the cache to break functionality.
            // The cache should be as transparent as possible.
            // If insight is needed into these exceptions,
            // a better way would be by notifying an observer with the errors.
        }
    }