# Google Maps Onebox data is not cached

**URL:** <https://meta.discourse.org/t/google-maps-onebox-data-is-not-cached/59124>\
**Category:** Feature\
**Created:** [March 15, 2017, 1:39am UTC](https://meta.discourse.org/t/google-maps-onebox-data-is-not-cached/59124 "2017-03-15T01:39:01Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [March 16, 2017, 11:58pm UTC](https://meta.discourse.org/t/google-maps-onebox-data-is-not-cached/59124/12 "2017-03-16T23:58:54Z")

</div>

Thing is, there are currently 0 providers that are cache header aware, and even if the actual data required to generate a onebox is usually much smaller, we are still talking pretty tiny payloads of view.

Regardless, I am totally happy to nuke this built in caching, because I find it super complicated to follow in the code and just have `preview` return all the data required to make the decisions.

```plaintext
Onebox.preview("http://xyz") =>

{
    data: {} # raw data used to render the onebox,
    valid_till: ... # optionally return when it is valid till
    etc... 
}

```

Then you can cache `data` in the consumer, and call preview forcing data if you wish to bypass http

Feel free to work on a PR in this direction I think it is a valid change

---

_[View the full topic](https://meta.discourse.org/t/google-maps-onebox-data-is-not-cached/59124)._
