latata
latata

Reputation: 1723

Symfony component caching

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?

Upvotes: 0

Views: 472

Answers (1)

latata
latata

Reputation: 1723

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

Upvotes: 2

Related Questions