Where is the best place to store plugin cache data?

I don’t have a site folder anymore. I use Bricks so I don’t need it. But a solution would be to let the plugin have a custom path with a fallback to site/something.

Now I have two real possible cases:

1. Security widget data

Let’s say I want to cache widget data every week and I save the cache to the cache folder. If a user save a page, then the cache is cleared, right? Then the cached might be cleared every day which means the widget cache will be cleared every day instead of every week. In the long run it means a slower Panel startpage.

In that case I wonder if the cache folder is good after all. It’s two different kinds of cache.

2. Plugin installer

If I will build it, every plugin need to somehow be bundled with the repo url or at least the username of the plugin creator to build the url. Let’s say I keep this data in a single file which updates when a plugin is added, deleted or change. It might feel overkill to add a new folder in site for just one cache file. It could be possible to add it to the site root as a file, not sure what is best. Also if I have 4 plugins like this, should they all create their different site cache folders?

In conclusion, I feel like there are many different working approaches but no perfect one. I also agree that saving the data in the plugin folder also include some possible problems.