# HubL caching deal object.

**URL:** <https://community.hubspot.com/t/hubl-caching-deal-object/86033>\
**Category:** CMS Development\
**Created:** [July 25, 2023, 3:24am UTC](https://community.hubspot.com/t/hubl-caching-deal-object/86033 "2023-07-25T03:24:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JOConnell2](https://avatars.discourse-cdn.com/v4/letter/j/ad7895/32.png) [@JOConnell2](https://community.hubspot.com/u/JOConnell2)\
**Post date:** [July 25, 2023, 3:24am UTC](https://community.hubspot.com/t/hubl-caching-deal-object/86033/1 "2023-07-25T03:24:10Z")

</div>

I have a very simple HTML page that uses the following three lines of HubL.

{% set deal\_query = “limit=999& **myFilteringProperty** =true” %}

{% set deal\_properties = " id, dealname, myFilteringProperty"%}

{% set filteredDealObjects = crm\_objects(“deal”, deal\_query, deal\_properties) %}

If I print the output of the **filteredDealObjects** I can see the deals I expect to be returned are in fact returned and I can use this information to create an HTML select element with all the deals as options.

Once you select the deal you want to work with you fill in and submit a form there is some javascript that will update **myFilteringProperty** via the Hubspot API to be false. I won’t post the frontend/backend javascript as I can manually check these are working as expected by opening the deal in the CRM and checking the deal property. I can see **myFilteringProperty** is definetly set to false for the deal I have just submitted.

If I then refresh the page, the same HubL will return all the sames deals as before including my deal which now has **myFilteringProperty == false.** The only way I can ever get the the list of deals that are returned to update is by making a change to the HTML code and uploading it via the HS CLI tool or via the design tools.

An obvious workaround for this would be that I just use javascript to make the request for the deal objects to build the select element in the first place but am I crazy in thinking that this is what HubL is for?

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [July 25, 2023, 9:46pm UTC](https://community.hubspot.com/t/hubl-caching-deal-object/86033/2 "2023-07-25T21:46:30Z")

</div>

Hi, @JOConnell2 👋 Thanks for your question. Based on my read of the documentation, your approach of using JavaScript to [hydrate](https://developers.hubspot.com/docs/cms/guides/js-frameworks#server-side-rendering-and-client-side-rendering:~:text=use%20JavaScript%20to-,hydrate,-or%20client%2Dside) your page details is a recommended approach.

Have fun building! — Jaycee
