joomla เก็บ cach query ได้ไหมคับ
Moderator: mindphp, ผู้ดูแลกระดาน
-
- PHP Super Hero Member
- โพสต์: 758
- ลงทะเบียนเมื่อ: 08/06/2015 10:07 am
joomla เก็บ cach query ได้ไหมคับ
joomla เก็บ cach query ได้ไหมคับ
- tsukasaz
- PHP VIP Members
- โพสต์: 22143
- ลงทะเบียนเมื่อ: 18/04/2012 9:39 am
Re: joomla เก็บ cach query ได้ไหมคับ
joomla มีเก็บ cache ครับ
ส่วน cache ของ query ข้อมูลจาก database ถ้าเขียน component และมีการดึงรายการข้อมูลผ่าน class JModelList จะมีการเก็บ cache ให้
แต่การเก็บ Cache ที่เจอจะเป็นของใครของมัน ถ้าอยากรู้ต้องลองเล่น JCache ดูครับ
ส่วน cache ของ query ข้อมูลจาก database ถ้าเขียน component และมีการดึงรายการข้อมูลผ่าน class JModelList จะมีการเก็บ cache ให้
โค้ด: เลือกทั้งหมด
/**
* Method to get an array of data items.
*
* @return mixed An array of data items on success, false on failure.
*
* @since 12.2
*/
public function getItems()
{
// Get a storage key.
$store = $this->getStoreId();
// Try to load the data from internal storage.
if (isset($this->cache[$store]))
{
return $this->cache[$store];
}
// Load the list items.
$query = $this->_getListQuery();
try
{
$items = $this->_getList($query, $this->getStart(), $this->getState('list.limit'));
}
catch (RuntimeException $e)
{
$this->setError($e->getMessage());
return false;
}
// Add the items to the internal cache.
$this->cache[$store] = $items;
return $this->cache[$store];
}
The last bug isn't fixed until the last user is dead. (Sidney Markowitz, 1995)
- eieikuean
- PHP Newbie
- โพสต์: 1
- ลงทะเบียนเมื่อ: 05/09/2015 4:10 pm
Re: joomla เก็บ cach query ได้ไหมคับ
น่าจะได้คับ
-
- Similar Topics
- ตอบกลับ
- แสดง
- โพสต์ล่าสุด
-
-
โพสต์ใหม่ วิธีการ Query คำสั่ง SQL ใน Joomla (insert, select, update, delete)
โดย moomai » 01/06/2017 4:34 pm » ใน Joomla Development - 0 ตอบกลับ
- 3253 แสดง
-
โพสต์ล่าสุด โดย moomai
01/06/2017 4:34 pm
-
-
-
โพสต์ใหม่ Resource id #360 .. query หมายความว่าไง
โดย thatsawan » 23/06/2015 4:47 pm » ใน Programming - PHP - 2 ตอบกลับ
- 2383 แสดง
-
โพสต์ล่าสุด โดย mindphp
23/06/2015 6:41 pm
-
-
- 2 ตอบกลับ
- 3599 แสดง
-
โพสต์ล่าสุด โดย powerbeer
22/11/2022 9:08 pm
ผู้ใช้งานขณะนี้
สมาชิกกำลังดูบอร์ดนี้: ไม่มีสมาชิกใหม่ และบุคลทั่วไป 96