简体   繁体   中英

How to clear Memcache in symfony 1.4

I am using sfMemcacheCache in symfony 1.4 and i don't know how to clear cache on RAM

(factories.yml)

prod:
  logger:
    class:   sfNoLogger
    param:
      level:   err
      loggers: ~

test:
  storage:
    class: sfSessionTestStorage
    param:
      session_path: %SF_TEST_CACHE_DIR%/sessions

  response:
    class: sfWebResponse
    param:
      send_http_headers: false

  mailer:
    param:
      delivery_strategy: none

dev:
  mailer:
    param:
      delivery_strategy: none

all:
  routing:
    class: sfPatternRouting
    param:
      generate_shortest_url:            true
      extra_parameters_as_query_string: true

  view_cache_manager:
    class: sfViewCacheManager
    param:
      cache_key_use_vary_headers: true
      cache_key_use_host_name:    true



  view_cache:
      class: sfMemcacheCache
      param:
        automatic_cleaning_factor: 0
        servers:
          localhost:
            host: localhost
            port: 11211        
            serializer: IGBINARY
            mode: compiled

I'm sure this will do it:

// Erase the whole cache
$ php symfony cache:clear

// Short syntax
$ php symfony cc

If this does not work, has the cache is in RAM, you just have to restart your server, If you're using apache do:

$ service apache2 restart

You can just restart the memcached server;

/etc/init.d/memcached restart

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM