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
- โพสต์: 21991
- ลงทะเบียนเมื่อ: 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 ตอบกลับ
- 3230 แสดง
-
โพสต์ล่าสุด โดย moomai
01/06/2017 4:34 pm
-
-
- 2 ตอบกลับ
- 3556 แสดง
-
โพสต์ล่าสุด โดย powerbeer
22/11/2022 9:08 pm
-
-
โพสต์ใหม่ document.getElementById vs Query $()
โดย jataz2 » 18/09/2023 12:09 pm » ใน JavaScript & jQuery Ajax & Node.JS - 0 ตอบกลับ
- 695 แสดง
-
โพสต์ล่าสุด โดย jataz2
18/09/2023 12:09 pm
-
-
- 2 ตอบกลับ
- 4331 แสดง
-
โพสต์ล่าสุด โดย mindphp
24/12/2021 10:50 am
ผู้ใช้งานขณะนี้
สมาชิกกำลังดูบอร์ดนี้: ไม่มีสมาชิกใหม่ และบุคลทั่วไป 99