Hi,
we have two Yii2 applications, lets say app A and app B. In both of them we have a component ‘cache’ (\yii\caching\FileCache::class).
In both applications we have a component ‘urlManager’ configured like this:
‘class’ => UrlManager::class,
‘enablePrettyUrl’ => true,
‘enableStrictParsing’ => true,
‘showScriptName’ => false,
‘rules’ => $routes
The $routes
is an array with different routes, defined in different flavors like (changed as I can’t show the actual routes):
‘GET /monitoring/info/modules’ => ‘monitoring/modinfo/get-mods’,
[
‘verb’ => ‘GET’,
‘pattern’ => '/user/history,
‘route’ => ‘userhistory/default/list’,
],
[
‘class’ => ‘yii\web\GroupUrlRule’,
‘prefix’ => ‘admin’,
‘rules’ => […],
]
only in the problem causing app B we are also using this flavor:
[
‘class’ => yii\rest\UrlRule::class,
‘controller’ => [‘numbers’ => ‘specialnumbers/numbers-summary’],
‘prefix’ => ‘user//’,
‘except’ => [‘options’, ‘patch’, ‘head’, ‘put’, ‘post’],
],
Both are running, but app B is creating new cache entries time an URL is call, even its the same URL like pressing refresh in the browser.
As far as I could see the files created in the cache folder have the same content.
Both apps are running on VMs configured identically, in terms of OS, PHP version and modules. And app A uses Yii version 2.0.38 and app B uses Yii version 2.0.37.
Does anyone experienced this kind of behavior too?
Any suggestions?
Thanks in advance.