Browser cache for dynamic content (list of tags)

WP has multiple caching APIs really. For caching of data, that can be easily rebuilt, Transients API is typically used.

However it’s up to you how to architecture interaction with your script. WP exposes Ajax endpoint but its performance is questionable if you need extremely fast responses.