Does anybody knows how to implement client-side data caching under locker service (as it disables default browser cache call from js)?

The use case is as follows: I have community page built with several components on it. These components uses the same set of data to some extent, so I want to fetch this data once, and store it somewhere (preferable in some map/wrapper object) so components wouldn't have to retrieve them on every single init.

I'll appreciate any help and ideas. Thanks!

1 Answer 1


It's best to work with the framework, so I suggest that you have a read about the caching that Lightning offers

  • Storable actions
  • Lightning Data Service
  • Custom cache

See: https://developer.salesforce.com/blogs/developer-relations/2017/04/lightning-components-performance-best-practices.html#data_caching

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .