# Lots of pages, slow start

**URL:** <https://forum.getkirby.com/t/lots-of-pages-slow-start/10582>\
**Category:** Questions\
**Tags:** v2\
**Created:** [June 7, 2018, 12:29pm UTC](https://forum.getkirby.com/t/lots-of-pages-slow-start/10582 "2018-06-07T12:29:17Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![bnomei](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/bnomei/32/775_2.png) [@bnomei](https://forum.getkirby.com/u/bnomei)\
**Post date:** [June 7, 2018, 2:18pm UTC](https://forum.getkirby.com/t/lots-of-pages-slow-start/10582/4 "2018-06-07T14:18:36Z")

</div>

@bvdputte i have lots dynacmic lists and filtering as well as editorial updates. but i probably should just cache the html output manually for a few seconds to reduce the processing load.

@texnixe i see. thanks. most of my calls seem to originate from `$page->children()` which trigger the `inventory()` of various sub-objects. what do you think will happen if i persist the inventory array of pageobjects between two skript calls? the current `$page->cache` object is only for one skript call, not for a session, or multiple pageviews at the same time, right?

like saving the array to a file and read it back if within a few seconds?

like with this simple json read-write? (just without the encode/decode typo).

> [@Cache part of a page?](https://forum.getkirby.com/t/cache-part-of-a-page/5199/3):
>
> i just create a file in site/cache myself and read data (json in my case) back if needed. so i do not need to enable cache for complete site. $data = null; $cacheFile = kirby()-\>roots()-\>cache().DS.md5('cache-for-something').'.json'; if(!f::exists($cacheFile) || ( f::exists($cacheFile) && (time() - f::modified($cacheFile) \> c::get('cache.refresh', 360)) ) // seconds ) { $data = []; // get data somehow f::write($cacheFile, json\_decode($data)); } else { $data = json\_decode(f::read(…

creating and loading my cache here…  
[https://github.com/getkirby/kirby/blob/master/core/page.php#L295](https://github.com/getkirby/kirby/blob/master/core/page.php#L295)

clearing my custom cache of inventory here as well…  
[https://github.com/getkirby/kirby/blob/master/core/page.php#L70](https://github.com/getkirby/kirby/blob/master/core/page.php#L70)

i know doing file.cache could solve some problems but i also want to speed up the processing of my massive page collections.

---

_[View the full topic](https://forum.getkirby.com/t/lots-of-pages-slow-start/10582)._
