public function isCached($key)
    {
        if ($cachedData = $this->loadCache()) {
            if (isset($cachedData[$key])) {
                if (!$this->isExpired($cachedData[$key]['time'], $cachedData[$key]['expire'])) {
                    return true;
                }
            }
        }
        return false; // If cache file doesn't exist or cache is empty or key doesn't exist in array, key isn't cached
    }