developer.jelix.org is not used any more and exists only for
history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.
Opened 10 years ago
Closed 10 years ago
#1292 closed bug (fixed)
jCache::flush() would delete cache of all profiles when using file cache
Reported by: | bricet | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | Jelix 1.2.2 |
Component: | jelix:plugins:cache | Version: | 1.2.1 |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Documentation needed: | no | |
Hosting Provider: | Php version: |
Description
We have the current config :
- several (at least 2) jCache profiles using "file" as driver
- on some circumstancies, we trigger a jCache::flush() on one of our profiles
Even though we set specific file_name_prefix for each one of our profiles, the flush() flushes data of all profiles. This is because flush() will delete the whole cache directory.
As file_name_prefix is optional, I propose to append profile's name to cache path. Here is a patch to do that.
Attachments (1)
Change History (4)
Changed 10 years ago by bricet
comment:1 Changed 10 years ago by bibo
comment:2 Changed 10 years ago by laurentj
- Milestone set to Jelix 1.2.2
- review set to review+
comment:3 Changed 10 years ago by laurentj
- Resolution set to fixed
- Status changed from new to closed
Pushed. I also updated tests. https://bitbucket.org/jelix/jelix-1.2.x/changeset/96dab8aaf8d4
Note: See
TracTickets for help on using
tickets.
Before pushing the patch (if it is accepted), we should take a glance at other drivers and see if they behave correctly in this context.