Yii Framework Forum: do i have to clear schema cache after table structure changes? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

do i have to clear schema cache after table structure changes?

#1 User is offline   nguyendh 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 261
  • Joined: 21-March 11

Posted 15 September 2017 - 12:32 PM

I enable db schema caching as instructed at [ http://www.yiiframew...schema-caching] . It does not say how to clear cache after db changes.

I would like to confirm that db schema works clear cache automatically ??
0

#2 User is offline   cshehadi 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 64
  • Joined: 10-July 09
  • Location:New York City

Posted 15 September 2017 - 03:41 PM

make sure you set:

'schemaCacheDuration' => 3600,

to whatever duration works for you. the cached schema will expire after that time.

You can clear out the cache manually when you launch new schema changes, with command line:

./yii cache/flush-schema
1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users