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.

Opened 7 years ago

Closed 7 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)

ticket_1292.patch (694 bytes) - added by bricet 7 years ago.

Download all attachments as: .zip

Change History (4)

Changed 7 years ago by bricet

comment:1 Changed 7 years ago by bibo

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.

comment:2 Changed 7 years ago by laurentj

  • Milestone set to Jelix 1.2.2
  • review set to review+

comment:3 Changed 7 years ago by laurentj

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.