joomla เก็บ cach query ได้ไหมคับ

ถามตอบ ปัญหาการพัฒนา Extension ไม่ว่าจะเป็น Module plugin Component หรือ แม้แต่ template การปรับแต่งโค้ด Joomla ต่างๆ ทุกเวอร์ชั่น 1.5 2.5 หรือ 3.x

Moderator: mindphp, ผู้ดูแลกระดาน

M027
PHP Super Hero Member
PHP Super Hero Member
โพสต์: 758
ลงทะเบียนเมื่อ: 08/06/2015 10:07 am

joomla เก็บ cach query ได้ไหมคับ

โพสต์ที่ยังไม่ได้อ่าน โดย M027 »

joomla เก็บ cach query ได้ไหมคับ
ภาพประจำตัวสมาชิก
tsukasaz
PHP VIP Members
PHP VIP Members
โพสต์: 21991
ลงทะเบียนเมื่อ: 18/04/2012 9:39 am

Re: joomla เก็บ cach query ได้ไหมคับ

โพสต์ที่ยังไม่ได้อ่าน โดย tsukasaz »

joomla มีเก็บ cache ครับ

ส่วน 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];
    }
แต่การเก็บ Cache ที่เจอจะเป็นของใครของมัน ถ้าอยากรู้ต้องลองเล่น JCache ดูครับ
The last bug isn't fixed until the last user is dead. (Sidney Markowitz, 1995)
ภาพประจำตัวสมาชิก
eieikuean
PHP Newbie
PHP Newbie
โพสต์: 1
ลงทะเบียนเมื่อ: 05/09/2015 4:10 pm

Re: joomla เก็บ cach query ได้ไหมคับ

โพสต์ที่ยังไม่ได้อ่าน โดย eieikuean »

น่าจะได้คับ
ตอบกลับโพส
  • Similar Topics
    ตอบกลับ
    แสดง
    โพสต์ล่าสุด

ผู้ใช้งานขณะนี้

สมาชิกกำลังดูบอร์ดนี้: ไม่มีสมาชิกใหม่ และบุคลทั่วไป 99