Answers.Body: <p>I experienced a similar issue, and tracked it down to a web spider crawling the Solspace Calendar plugin for Craft. There are no bounds on the calendar, and so the bot was hitting pages like /calendar/day/2033/07/09.</p>
  <p>I guess Craft sees all those pages as unique because of the unique URL, and creates cached files for each one. My temporary fix was to just ban the bot. But I think the permanent solution will be to prevent the &quot;Next&quot; and &quot;Previous&quot; buttons from appearing on the calendar pages when they hit a certain limit.</p>
  <p>Not sure if this helps with your specific issue, but thought it might help someone else when they run into something similar.</p>
  <p>I would suggest searching your web access logs for a bot that might be caught up in your link structure.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-10-26T00:21:34.083Z
Answers.LastActivityDate: 2022-10-26T00:21:34.083Z
Answers.UserDisplayName: Eli
Body: <p>My Craft CMS 3.7.38 is creating over 250.000 almost identical cache files inside the <code>/storage/runtime/cache/</code>-folder. Because the website isn't even a frequently used big platform, I have no idea why the framework is flooding the cache in such a way, resulting in the website crashing because the hoster limited the number of files to a reasonable amount.</p>
  <p>I already tried to reduce the max cache time, I disabled all plugins to be sure that it's the framework itself, I am not using any <code>{% cache %}</code> tags myself in the templates and it seems to be connected to using matrix fields. Currently, I can only flush the &quot;data cache&quot; once a day to prevent the website from crashing.</p>
  <p>Almost all cache files look like this:</p>
  <pre><code>a:2:{i:0;a:1:{i:0;a:0:{}}i:1;O:37:&quot;craft\cache\ElementQueryTagDependency&quot;:3:{s:4:&quot;tags&quot;;a:3:{i:0;s:7:&quot;element&quot;;i:1;s:29:&quot;element::craft\elements\Entry&quot;;i:2;s:32:&quot;element::craft\elements\Entry::*&quot;;}s:4:&quot;data&quot;;a:3:{s:40:&quot;CraftCMSce35088bdfe0816226cd17fd051a1234&quot;;s:21:&quot;0.45746100 1651155155&quot;;s:40:&quot;CraftCMS2743a789e8993267a348eee1ee7e8742&quot;;s:21:&quot;0.45746100 1651155155&quot;;s:40:&quot;CraftCMS0c445ad43e1ed6e749c63233356asd57&quot;;s:21:&quot;0.54989000 1651155155&quot;;}s:8:&quot;reusable&quot;;b:0;}}
  </code></pre>
  <p>Thank you for any kind of hint.</p>
  
Tags: <cache><filecache>
Title: Craft creating over 250.000 cache files
ThreadText: # Craft creating over 250.000 cache files
  
  (Asked by: username_0 on 2022-04-29)
  
  My Craft CMS 3.7.38 is creating over 250.000 almost identical cache files inside the `/storage/runtime/cache/`-folder. Because the website isn't even a frequently used big platform, I have no idea why the framework is flooding the cache in such a way, resulting in the website crashing because the hoster limited the number of files to a reasonable amount.
  
  I already tried to reduce the max cache time, I disabled all plugins to be sure that it's the framework itself, I am not using any `{% cache %}` tags myself in the templates and it seems to be connected to using matrix fields. Currently, I can only flush the "data cache" once a day to prevent the website from crashing.
  
  Almost all cache files look like this:
  
  ```
  a:2:{i:0;a:1:{i:0;a:0:{}}i:1;O:37:"craft\cache\ElementQueryTagDependency":3:{s:4:"tags";a:3:{i:0;s:7:"element";i:1;s:29:"element::craft\elements\Entry";i:2;s:32:"element::craft\elements\Entry::*";}s:4:"data";a:3:{s:40:"CraftCMSce35088bdfe0816226cd17fd051a1234";s:21:"0.45746100 1651155155";s:40:"CraftCMS2743a789e8993267a348eee1ee7e8742";s:21:"0.45746100 1651155155";s:40:"CraftCMS0c445ad43e1ed6e749c63233356asd57";s:21:"0.54989000 1651155155";}s:8:"reusable";b:0;}}
  
  ```
  
  Thank you for any kind of hint.
  
  **Tags:** cache, filecache
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-10-26. Score: 4
  
  I experienced a similar issue, and tracked it down to a web spider crawling the Solspace Calendar plugin for Craft. There are no bounds on the calendar, and so the bot was hitting pages like /calendar/day/2033/07/09.
  
  I guess Craft sees all those pages as unique because of the unique URL, and creates cached files for each one. My temporary fix was to just ban the bot. But I think the permanent solution will be to prevent the "Next" and "Previous" buttons from appearing on the calendar pages when they hit a certain limit.
  
  Not sure if this helps with your specific issue, but thought it might help someone else when they run into something similar.
  
  I would suggest searching your web access logs for a bot that might be caught up in your link structure.
  
  
  ---
  
  