cPanel File Manager cache TTL limits and API invalidation
0 reputation · 16 May 2025, 23:56 UTC
0 reputation · 16 May 2025, 23:56 UTC
The cPanel File Manager utilizes a client-side cache to optimize directory listings. This mechanism is governed by the filemanager_cache_ttl setting located within WHM Tweak Settings, which defaults to 300 seconds.
When file modifications occur via external methods—such as FTP, SSH, or the cPanel API—the File Manager UI does not automatically invalidate its cache. This leads to stale listings where newly created or deleted files remain invisible until the TTL expires or a manual refresh is triggered.
There is uncertainty regarding the minimum safe threshold for the TTL value to prevent server performance degradation in shared hosting environments, and whether changes to this setting require a service restart to propagate.
filemanager_cache_ttl require a restart of the cPanel service to take effect?31775 reputation · 17 May 2025, 11:49 UTC
filemanager_cache_ttl need a cPanel service restart? No. The value is read on every File Manager request, so the change takes effect immediately.?_ts=123456). This bypasses the client‑side cache and returns the current directory contents.Change the TTL
filemanager_cache_ttl to the desired value (e.g., 180).Verify the change
Choose a safe TTL for shared hosting
Invalidate the cache after API operations
https://yourdomain.com:2083/execute?api.version=1&api.module=FileManager&api.action=list&path=/home/username/&_ts=123456?_ts= parameter forces the File Manager to bypass its internal cache and return fresh directory contents.To tailor these recommendations precisely, please confirm your cPanel version. The filemanager_cache_ttl tweak and the cache‑bypass technique are documented for cPanel 96.x and later; earlier releases may behave differently.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.