CodeIgniter¿ò¼Ü¸Ä½øÊý¾Ý¿âÎļþ»º´æ£¬Ìí¼Ó¹ýÆÚʱ¼ä
CodeIgniter database/DB_dirver.php ÖÐ Ô¼ 1021ÐÐ cache_on º¯ÊýÌ滻Ϊ:
ͬʱÐèÒªÉ趨»º´æ·¾¶
function cache_on($expire_time=0) //add parm expire time - »º´æ¹ýÆÚʱ¼ä { $this->cache_expire_time = $expire_time; //add by kenvin $this->cache_on = TRUE; return TRUE; }
CI database/DB_cache.php ÖÐ 90ÐÐ read º¯Êý if (FALSE === ($cachedata = read_file($filepath))) Ò»ÐÐÇ°Ãæ¼ÓÉÏ//ÅжÏÊÇ·ñ¹ýÆÚ // cache_expire_time if ( !file_exists($filepath) ) { return false; } if ( $this->db->cache_expire_time > 0 && filemtime($filepath) < time() - $this->db->cache_expire_time) { return false; }
ÔÚÐèÒª¿ªÆôÊý¾Ý¿â»º´æµÄµØ·½Ð´£º $this¡údb¡úcache_on($SEC); $SEC ΪÐèÒª»º´æµÄÃëÊý¡£
0 ΪÓÀ²»¹ýÆÚ¡£ Èç $this¡údb¡úcache_on(3); ±íʾ»º´æ3Ãë¡£3Ãëºó×Ô¶¯Ê§Ð§¡£
ÍƼöÐÅÏ¢
- ¡¾ÊÓƵ²¥·Å¡¿JplayerÊÓƵ²¥·ÅÆ÷µÄʹÓÃ
- memcacheÄÚ´æÔÀí
- Memcache¼¼Êõ·ÖÏí£º½éÉÜ¡¢Ê¹Óᢴ洢¡¢Ëã·¨¡¢ÓÅ»¯....
- php³£ÓÃÕýÔò±í´ïʽ
- phpÐÔÄܼà²âÄ£¿éXHProf
- ÈÃCI¿ò¼ÜÖ§³Öservice²ã
- ʹÓÃPHPÉú³É´øLOGOµÄ¸öÐÔ»¯¶þάÂëͼÏñ
- ¹ØÓÚCodeIgniterÄã¿ÉÄܲ»ÖªµÀµÄ5¸ö֪ʶµã
- Memcache ºÁÃ뼶³¬Ê±¼°ÆäËû³£¼ûÎÊÌâ»ã×Ü
- [PHP±Ê¼Ç]PHPQueryÒ»¸ö´¦ÀíDOMµÄÀûÆ÷
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
×î½ü¸üÐÂ
- PHP»ñÈ¡Óû§µÄÕæʵIP£¬²¢ÅжÏÊÇ·ñÄÚÍøIP
- PHP ´íÎóÈÕÖ¾ error_log
- ÀûÓÃbigpipe»úÖÆʵÏÖÒ³ÃæÄ£¿éµÄÒì²½äÖȾ chunked¼¼Êõ
- php¿ØÖÆÎļþÏÂÔØËÙ¶È
- js + php ¶ÁÈ¡¡¢²¥·ÅÊÓƵÁ÷ ¼æÈÝfirefox£¬c....
- ¡¾ÊÓƵ²¥·Å¡¿JplayerÊÓƵ²¥·ÅÆ÷µÄʹÓÃ
- UNICODE Óë UTF-8 µÄ¹Øϵ
- memcacheÄÚ´æÔÀí
- Memcache¼¼Êõ·ÖÏí£º½éÉÜ¡¢Ê¹Óᢴ洢¡¢Ëã·¨¡¢ÓÅ»¯....
- phpʹÓÃmb_detect_encoding¼ì²â×Ö·û´®±àÂë
ÆÀÂÛ