Persist the `.cache` and `public` directories between incremental build pipelines

Hi,

I need to persist the .cache and public directories between incremental build pipelines.
every time I will make code change gatsby will only update those file which having new data.

Workspace: I found a concept for a workspace where one. can share data between workflows but not pipelines.

Cache: This feature only cache dependencies.

Artifacts: This feature stores data after the pipeline finish.

For my scenario shall I have to upload whole public and .cache folder to some third location? example s3 bucket and download again before build?

This is incorrect.

What you need to use is CircleCI caching. The save_cache step would be used once the content you want to cache exists and the load_cache step would be used near the beginning of a build to restore the cache if it’s available.