# Pre-aggregations / Level 2 Caching Update

**URL:** <https://community.embeddable.com/t/pre-aggregations-level-2-caching-update/149>\
**Category:** FAQs\
**Created:** [September 29, 2025, 8:41am UTC](https://community.embeddable.com/t/pre-aggregations-level-2-caching-update/149 "2025-09-29T08:41:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ella-embeddable](https://dub1.discourse-cdn.com/flex013/user_avatar/community.embeddable.com/ella-embeddable/32/15_2.png) [@ella-embeddable](https://community.embeddable.com/u/ella-embeddable)\
**Post date:** [September 29, 2025, 8:41am UTC](https://community.embeddable.com/t/pre-aggregations-level-2-caching-update/149/1 "2025-09-29T08:41:33Z")

</div>

**What’s changing**  
We’ve updated our pre-aggregations set-up to support more functionality: partitioning, incremental, and refreshKeys that you can use in your model.

**Can I use refresh keys directly in the model?**  
Yes. You can pass a time period (e.g. “x hours”), an SQL parameter like `SELECT MAX(created_at) FROM orders`, or a cron schedule (e.g. “refresh at 8 AM”).

Here’s what your model and pre-aggregation looks like before and after the change:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/embeddable1/original/1X/ba3b863679264476b06e9802d224933eaa113932.jpeg)

**Do I still need to provide security contexts via the caching API?**  
Yes - you’ll provide these via the caching API - [Cube docs here](https://cube.dev/docs/product/configuration/reference/config#scheduled_refresh_contexts). However the refreshInterval isn’t needed anymore.

Here’s what your caching api request looks like before and after the change:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/embeddable1/original/1X/3d72bef201576abe09570f4f8ecbdac3b2deb3c1.jpeg)

**Is there still a limit on security contexts?**  
No. The old limit of 30 has been removed.

**Do I need to pass timezones?**  
If your client requires a timezone, it must still be passed via the caching API.

We will be updating our main docs page shortly - bear with us 😊
