does register simplecache actually do anything?

Hi, I was sure that using the register_simplecache function will

cache the views and than use them,

it seems like they will be generated but the cached files will not be used,

is this on purpose?

  • Where did you read that "files will not be used" ?

    Only "atomic" views are simple-cached and re-used.

  • I don't know what you mean by "atomic" views, I know that css and js views are used,

    I mean that when I register my own views using the register_simplecache function I notice

    that they are not read from the cache, but from the view file itself.

    I want to know if there's a way to make my own views that are cached be used from the cache

    Thanx in advance, fiftyeight

  • 4 days later.. ;-o ;-)

    "Atomic" is Vs "Molecular" - the analogy indicates that the view must be most likely independent of any qualifications - the encumbered view.

    EG. if the view is qualified by parms - then should not work off SimpleCache.

    If you read thru the SimpleCache Core code - you will see how the mechanism operates.

    We know that SimpleCache does work - data subfolder views_simplecache holds the cached data.



  • ok Thanx, so as long as the view has no parameters and I register it using register_simplecache function than it should be loaded from the cache?

    it seems that the JS, CSS and profile icons have special code to check the cache that does not

    exist in the elgg_view function, but maybe I'm missing something.

  • well I'm not too sure about the icons but it seems that the files css.php and js.php that are in the _css folder, they have the command:

    require_once(dirname(dirname(__FILE__)) . '/simplecache/view.php');

    it seems you have to use this file in order to get a view from the cache.

    what I want is that my own views that I register using register_simplecache will be read

    from the cache instead of the php file being executed to enhance performance.

    Is this something that the core elgg has support for? if not I can make a view

    that gets a name of a view as a parameter and checks if it's in the cache and if so it returns it.

  • Any response? it still doesn't seem to me like the elgg_view function will print the view from the cache

    do I need to make a new view that will check if the file exists in cache first and if so print it from the cache?