Local Storage != browser cache, browser cache can be simulated using HTTP Cache Manager, for simulating operations which assume usage of the local storage you will need to have a real browser.
As per Window.localStorage documentation:
The localStorage read-only property of the window interface allows you to access a Storage object for the Document's origin; the stored data is saved across browser sessions.
and the Document is:
The Document interface represents any web page loaded in the browser and serves as an entry point into the web page's content, which is the DOM tree.
As per JMeter project main page:
JMeter is not a browser, it works at protocol level. As far as web-services and remote services are concerned, JMeter looks like a browser (or rather, multiple browsers); however JMeter does not perform all the actions supported by browsers. In particular, JMeter does not execute the Javascript found in HTML pages. Nor does it render the HTML pages as a browser does (it's possible to view the response as HTML etc., but the timings are not included in any samples, and only one sample in one thread is ever displayed at a time).
So the only way to implement your scenario is using real browser, for example you can consider using WebDriver Sampler which provides JMeter integration with Selenium browser automation framework, this way you will have Local Storage and ability to clear it when needed.
WebDriver Sampler can be installed using JMeter Plugins Manager