Welcome Guest, Not a member yet? Register   Sign In
Efficiently re-using code
#6

[eluser]Xandrios[/eluser]
That is a good one for the data gathering/prepping indeed. However it would still require to copy/paste the main layout in every view. Would it be possible to somehow also use an extendable class in the view?

A (completely different) problem I came across is when caching database queries. The caching works fine, however the removing/clearing of the cache does not work at the index page. It does work with the 'normal' pages, just not with the index.

It seems to be caused by the fact that the cache file is written to the cache directory in a different way for the index page. The '$this->db->cache_delete()' is unable to delete that specific file.

$this->db->cache_delete_all(); does seem to be able to work at first sight, however that one deletes not only the cache files, but also the parent directory! Which, at the next pagehit, shows with a nasty error.

Is this a known bug that the index cache cannot be removed? Is there a workaround? Or am I missing something on how to remive the index cache?


Messages In This Thread
Efficiently re-using code - by El Forum - 07-06-2007, 01:45 PM
Efficiently re-using code - by El Forum - 07-06-2007, 02:34 PM
Efficiently re-using code - by El Forum - 07-06-2007, 03:08 PM
Efficiently re-using code - by El Forum - 07-06-2007, 07:12 PM
Efficiently re-using code - by El Forum - 07-06-2007, 07:25 PM
Efficiently re-using code - by El Forum - 07-07-2007, 05:50 AM
Efficiently re-using code - by El Forum - 07-07-2007, 06:23 PM
Efficiently re-using code - by El Forum - 07-08-2007, 10:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB