createBridgeClassName($bridgeName); if (!$bridgeClassName) { throw new \Exception(sprintf('Bridge not found: %s', $bridgeName)); } // whitelist control if (!$bridgeFactory->isEnabled($bridgeClassName)) { throw new \Exception('This bridge is not whitelisted', 401); die; } $bridge = $bridgeFactory->create($bridgeClassName); $bridge->loadConfiguration(); $value = $request['value']; $cache = RssBridge::getCache(); $cacheKey = get_class($bridge) . '_' . $key; $ttl = 86400 * 3; $cache->set($cacheKey, $value, $ttl); header('Content-Type: text/plain'); echo 'done'; } }