var cache = azurecache.create({
identifier: '<your_endpoint_url>', // or set the AZURE_CACHE_IDENTIFIER environment variable
token: '<your_access_key>', // or set the AZURE_CACHE_TOKEN environment variable
ttl: 3600 // optional TTL in seconds (default 1 day); or set the AZURE_CACHE_TTL env variable
});
There are two issues with this
the actual env variable used is AZURE_CACHE_TTL_SECONDS
the ttl option passed into create() is ignored. The actual ttl that will be used is the one passed into put(), process.env.AZURE_CACHE_TTL_SECONDS or oneDay
The README indicates to create a cache by
There are two issues with this
AZURE_CACHE_TTL_SECONDS
ttl
option passed intocreate()
is ignored. The actual ttl that will be used is the one passed intoput()
,process.env.AZURE_CACHE_TTL_SECONDS
oroneDay