2

I'm getting the following error with Yii cache

CDbCommand::execute() fail: SQLSTATE[23000]: Integrity constraint
violation: 19 UNIQUE constraint failed: YiiCache.id. La sentencia SQL
ejecutada fue: INSERT INTO YiiCache (id,expire,value) VALUES
('f5f5bcc0fd61886a71fba221738e512a',1550528514,:value).

How can I fix that?

e-israel
  • 623
  • 10
  • 30
  • 1
    Extend component you are using for cache and catch this exception. This is usually due to requests making at the same time. – SiZE Mar 30 '19 at 08:39
  • Thank you @SiZE let me try, then I'll post the result. – e-israel Mar 31 '19 at 04:15
  • You shouldn't use DB as a cache in the first place - depending on case file cache or redis/memcache cache may give much better results. – rob006 Sep 01 '19 at 19:21
  • @rob006 I'll check that one, I'm using SQLite to the cache, that is a Yii's utility. – e-israel Oct 24 '19 at 19:47

0 Answers0