ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 12058


Ignore:
Timestamp:
Jun 30, 2009, 2:34:04 AM (14 years ago)
Author:
ebihara
Message:

#4037:added ability to configure for session storage and prepared the preset configuration for using memcache

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/config/ProjectConfiguration.class.php.sample

    r12043 r12058  
    1919    sfConfig::set('op_is_mail_address_contain_hash', false);
    2020
     21    $this->configureSessionStorage('file');
     22
    2123    sfConfig::set('doctrine_model_builder_options', array(
    2224      'baseClassName' => 'opDoctrineRecord',
    2325    ));
     26  }
     27
     28  protected function configureSessionStorage($name, $options = array())
     29  {
     30    $sessionName = 'OpenPNE_'.sfConfig::get('sf_app', 'default');
     31
     32    if ('memcache' === $name)
     33    {
     34      sfConfig::set('sf_factory_storage', 'sfCacheSessionStorage');
     35      sfConfig::set('sf_factory_storage_parameters', array(
     36        'session_name' => $sessionName,
     37        'cache' => array(
     38          'class' => 'sfMemcacheCache',
     39          'param' => $options,
     40        )
     41      ));
     42    }
    2443  }
    2544
Note: See TracChangeset for help on using the changeset viewer.