Skip to content

Commit

Permalink
Docs about cache key limitation (yiisoft#13341) [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
Bizley authored and samdark committed Jan 7, 2017
1 parent fe14834 commit b113ad4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/guide/caching-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ For example, [[yii\db\Schema]] uses the following key to cache schema informatio

As you can see, the key includes all necessary information needed to uniquely specify a database table.

> Note: Values stored in cache via [[yii\caching\Cache::multiSet()|multiSet()]] or [[yii\caching\Cache::multiAdd()|multiAdd()]] can
have only string or integer keys. If you need to set more complex key store the value separately via
[[yii\caching\Cache::set()|set()]] or [[yii\caching\Cache::add()|add()]].

When the same cache storage is used by different applications, you should specify a unique cache key prefix
for each application to avoid conflicts of cache keys. This can be done by configuring the [[yii\caching\Cache::keyPrefix]]
property. For example, in the application configuration you can write the following code:
Expand Down

0 comments on commit b113ad4

Please sign in to comment.