15

I have a configuration-table(id,name,value), containing some configuration variables for my symfony application such as email_expiration_duration. I want to write a service to read these configuration varibales from symfony application.

I want cache the data in app/cache folder. That means I will read the data from database only if the data is not in cache. I will clear the cached data whenever the configuration value changes.

How can I do it in symfony2?

3
  • 1
    I also have the same problem.Eagerly waiting for the reply. Commented Dec 7, 2012 at 11:44
  • @pinku The answer is given below. Commented Feb 28, 2013 at 4:31
  • 1
    I wrote the comment before he answered for this question.I read the answer as soon as he posted.Anyway thanks for ur info. Commented Feb 28, 2013 at 8:23

1 Answer 1

4

If you want to store this information in a file you manually create in the app/cache folder, you may use the following solution: https://stackoverflow.com/a/13410635/1443490

If you don't want/need to care about what folder is used inside the app/cache folder and your project already uses Doctrine, you can follow this solution: https://stackoverflow.com/a/8900283/1443490

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.