Switching off subdomains in phpfastcache

248 views Asked by At

I'm using phpfastcache with files strategy. I'm caching sql queries. As I see phpfastcache creates folders with subdomain name (ex. www.domain.pl).

I have admin panel in admin.domain.pl which calls api.domain.pl.

Problem is that when I, for example, want to clear cache from admin panel it clears api.domain.pl directory - not www.domain.pl. Can I turn off subdomains in phpfastcache? I don't see such option.

Edit: I found answer here: https://stackoverflow.com/a/33848394/979911

2

There are 2 answers

0
piernik On

Accordinglly to: https://stackoverflow.com/a/33848394/979911 phpFastCache::setup('securityKey', 'phpfastcache'); is responsible for directory name

0
Geolim4 On

I'm a bit late on this, but a quick heads up on the securityKey:

In your example you tend to mutualize your website cache and admin cache.

This could to potential security issues as the cache directory are not longer compartmentalized.

I warmly advise you to setup two different security key and call them from your admin panel.