0

I turn on caching the component by editing cache.yml file in my module

_startpage:
  enabled: true
  contextual: true
  lifetime: 60 

There was no time difference after that but I think the component is cached because there is a symfony cache box over it (With cache info). I realized that the number of queries to DB is the same as without caching - component for sure execute some queries so why the number of queries did not changed?

3
  • Just spitballing here.. You're in production and have cleared cache when testing, right? Commented Jan 10, 2013 at 19:31
  • Can we see the component, the partial and the template which include the partial? Commented Jan 10, 2013 at 20:41
  • @Mike I test on dev environment with Cache turned on Commented Jan 11, 2013 at 16:34

1 Answer 1

2

Solved.

factories.yml

view_cache:
  class: sfFileCache
  param:
    automatic_cleaning_factor: 0
    cache_dir:                 %SF_TEMPLATE_CACHE_DIR%
    lifetime:                  86400
    prefix:                    %SF_APP_DIR%/template
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.