-
-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make keyPrefix default to $app->id for host-shared caches like Apc, Memcache #22
Comments
That would cause backwards compatibility break. Won't be done in 2.x. |
@samdark $app->id is the best place for Cache::keyPrefix, and the default configuration is not suitable to work because of cache intersect conflicts in multiple web-applications. So small code for big enhancements. Also, this will not "cause backwards compatibility break" in existing 2.x applications code, because the key prefix is not using in program logic never. Only empty keyPrefix may cause conflicts. |
Could be done in the default app config. |
yes! for ex. as Requres::cookieValidationKey is generated in default config when installing :) |
For shared caches, like APCu, Memcache, the defaut behaviour require to use keyPrefix, because of interpolability of hosting application, which share caches. So, defult configuration is not usabled.
I'm proposing set keyPrefix to \Yii::$app->id by default, so, the default configuration of \yii\cache\ApcCache, \yii\cache\MemCache become usable.
The text was updated successfully, but these errors were encountered: