diff --git a/src/Socialbox/Abstracts/CacheLayer.php b/src/Socialbox/Abstracts/CacheLayer.php index 4e07a5c..3e1f7af 100644 --- a/src/Socialbox/Abstracts/CacheLayer.php +++ b/src/Socialbox/Abstracts/CacheLayer.php @@ -1,90 +1,90 @@ getEngine(); + if (self::$instance === null) + { + $engine = Configuration::getCacheConfiguration()->getEngine(); - if ($engine === 'redis') - { - self::$instance = new RedisCacheLayer(); - } - else if ($engine === 'memcached') - { - self::$instance = new MemcachedCacheLayer(); - } - else - { - throw new RuntimeException('Invalid cache engine specified in the configuration, must be either "redis" or "memcached".'); + if ($engine === 'redis') + { + self::$instance = new RedisCacheLayer(); + } + else if ($engine === 'memcached') + { + self::$instance = new MemcachedCacheLayer(); + } + else + { + throw new RuntimeException('Invalid cache engine specified in the configuration, must be either "redis" or "memcached".'); + } } + + return self::$instance; } - - return self::$instance; - } -} \ No newline at end of file + } \ No newline at end of file diff --git a/src/Socialbox/Socialbox.php b/src/Socialbox/Socialbox.php index 4d4b0c6..7feb1d3 100644 --- a/src/Socialbox/Socialbox.php +++ b/src/Socialbox/Socialbox.php @@ -127,6 +127,12 @@ return; } } + else + { + http_response_code(400); + print('External domains are not supported yet'); + return; + } try {