개발 Q&A

제목 ci3 버전 캐쉬 오류 질문드립니다.
카테고리 PHP
글쓴이 jinowe 작성시각 2022/04/27 04:58:34
댓글 : 2 추천 : 0 스크랩 : 0 조회수 : 3436   RSS

회원가입 또는 로그인을 했을 때

Cache adapter "file" and backup "file" are both unavailable. Cache is now using "Dummy" adapter.

이러한 오류가 나고있습니다. 캐시가 중복으로 사용되서 생겨나는 오류인 것 같은데,

오랜시간 실마리를 찾을 수 없어서 질문 드립니다.

원인이 무엇인가요?

 다음글 정기 결제 시스템 일자 문제 (3)
 이전글 php에서 파일을 DB 안에 저장하고 다운로드 받을 수... (7)

댓글

변종원(웅파) / 2022/04/27 08:31:39 / 추천 1

캐시 디렉토리 쓰기 퍼미션 확인해보세요.

ci3 소스에서 Cache adapter로 검색하시면 선언한 아답터가 지원안될때 그리고 백업 아답터도 지원이 안될때 나오는 메세지 입니다.

 

public function __construct($config = array())
{
   isset($config['adapter']) && $this->_adapter = $config['adapter'];
   isset($config['backup']) && $this->_backup_driver = $config['backup'];
   isset($config['key_prefix']) && $this->key_prefix = $config['key_prefix'];

   // If the specified adapter isn't available, check the backup.
   if ( ! $this->is_supported($this->_adapter))
   {
      if ( ! $this->is_supported($this->_backup_driver))
      {
         // Backup isn't supported either. Default to 'Dummy' driver.
         log_message('error', 'Cache adapter "'.$this->_adapter.'" and backup "'.$this->_backup_driver.'" are both unavailable. Cache is now using "Dummy" adapter.');
         $this->_adapter = 'dummy';
      }
      else
      {
         // Backup is supported. Set it to primary.
         log_message('debug', 'Cache adapter "'.$this->_adapter.'" is unavailable. Falling back to "'.$this->_backup_driver.'" backup adapter.');
         $this->_adapter = $this->_backup_driver;
      }
   }
}
한대승(불의회상) / 2022/04/27 09:56:49 / 추천 1

캐시 드라이버 지정시 백업캐시는 메인과 다른 드라이버 지정이 필요합니다.

드라이버 지정을 아래와 같이 수정해 보세요.

$this->load->driver('cache', array('adapter' => 'file', 'backup' => 'dummy'));