We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

QueryBuilder Cache

foreach (Categories::find() as $category)
            $last_author[$category->id] = $this
                ->from(array('p' => 'Phosphorum\Models\Posts'))
                ->where('p.categories_id = "' . $category->id . '"')
                ->join('Phosphorum\Models\Users', "u.id = p.users_id", 'u')
                ->columns(array('p.users_id as users_id', 'u.name as name_user', 'p.title as post1_title', 'p.slug as post1_slug', 'p.id as post1_id'))
                ->orderBy('p.id DESC')


Code is from Phosphorum 2. Now, how to implement query cache on this QueryBuilder?