skip to Main Content

connection refuse with redis and phpfastcache

I am trying to set a connection to redis using phpfastcache but I keep getting connection refuse Here is my simple code: $defaultDriver = 'Redis'; $Psr16Adapter = new Psr16Adapter($defaultDriver); if(!$Psr16Adapter->has('foo')) { $Psr16Adapter->set('foo', 'test', 300); } else { $data = $Psr16Adapter->get('foo');…

VIEW QUESTION

Redis – Testing a function with a @cache.memoize gives PicklingError

I have some tests for functions that use cache, for example: Function: @retry(stop=stop_after_attempt(3)) @cache.cached(timeout=60, key_prefix='resouce_group_list') def get_azure_resource_groups(): data = [] resource_client = get_azure_resource_client() for item in resource_client.resource_groups.list(): data.append(item) return data Test: @patch("dev_maintenance.machines.get_azure_resource_client") def test_get_azure_list_rg(get_azure_resource_client): cache.clear() data = [] with app.app_context():…

VIEW QUESTION
Back To Top
Search