[eluser]Twisted1919[/eluser]
Thanks wabu , yesterday i was too tired , but today i took a closer approach and i solved my problem .
I took a look in log file and saw :
ERROR - 2009-10-06 04:14:07 --> Severity: Warning --> opendir(./system/db_cacheview+show-posts) [<a href='function.opendir'>function.opendir</a>]: failed to open dir: No such file or directory /var/www/vhosts/domain.com/httpdocs/myapp/system/helpers/file_helper.php 126
So, the problem was that $db['default']['cachedir'] = "./system/db_cache"; MUST have a trailing slash :
$db['default']['cachedir'] = "./system/db_cache/";
This was the reason , the system tryed to open ./system/db_cacheview+show-posts instead of ./system/db_cache/view+show-posts .
And as you can see the delete_files function is used when deleting cached files in database class .
Anyway, thanks for the heads up on this one