ylsideas/feature-flags

ChainRepository: turnOn/turnOff only store one repository

ignacioalles opened this issue · 2 comments

When using chain repository, only the repository set in store property is updated when turnOn/turnOff, but that change is not reflected when doing ->accessible() because some upstream repository may return an old value.

I think that turnOn and turnOff actions should be replicated in every repository. I'm using the following chain:

  • redis: a read cache to improve database access
  • database: can override default values if they are present
  • config: default values

With this setup, and choosing database as repository to store changes, I get redis still returning the previous values if I turn on or off any feature.

I've created a PR to address this as I'm experiencing a similar issue #28

I think this is the same issue as #13