cache problem

Hi, I want to know , how to clear cache in elgg?. Does their any elgg functions ? Please help me

  • I know of the main one called "Simple Cache" and you get to it through your Admin and then Site Admin, see below;

    image

    Always make sure you (after turning it off and saving) turn it back on by placing the tick back in and then hitting "Save". Hope the above helps. :)

  • Since version 1.5 there is also a cache for the views and action locations of your plugins.

    Note form the doc: "This means if you are a plugin developer who has added a new view to their plugin during development you must either enable/disable the plugin or run upgrade.php for the new view to be discovered."

  • Cache has been a great headache for the developers... every time you change something in youfiles, imean their name or location, you have to clear the cache... or elgg will not detect it..

    you can also do so by just deleting the view_paths file from the data folder on the root or whatever is the name of you data folder..

    Don't worry this file will be created automatically once you delete and with all the new locations..

  • Hi ,

    Thanks for your replies  Rob,thomas and Invisible :)

    I have a problem with profile icon display. I have added an option in the admin panel (in usermanagement section) for managing the user's profile icon.I won the match ;) but still have some cache problem in the display of the icon because entity's getIcon()  is returning  the  url with  cache id .So I am getting the latest icon only on page refresh .

    Do you have any suggession for this?

     

    Thanks in advance :)

     

     

     

  • Hello Kettyking  ,

    Did you update the icontime in the session and entity after  edit ?

    update $_SESSION['user']->icontime = time();
    (You can set the icontime of the entity after the file uploading  code.)
    Since the profile image uploading invokes the hook 'entity:icon:url'
    it returns a url as follows,which includes icon time as lastcache.

    $CONFIG->wwwroot . 'mod/profile/icondirect.php?lastcache='.$icontime.'
    &username='.$entity->username.'&size='.$size;
    (please check the code )

    in the editicon.php the icontime is taking from session.

    In case of other entity types for example in case of groups
    it is required to set icontime of the entity  after upload.
    if required  you can register your own entity:icon:url hook in the start.php

    example :

        register_plugin_hook('entity:icon:url', entity_type, 'icon_hookfunction');
       
        then define the icon_hookfunction in the start.php itself.
       
       
       
    I hope , this may be helpful for you . Try it out and  let me know the result.


    Thank you


    v!N!t@


       






  • Hello v!N!t@,

                   fantastic!  ....  Even Kevin couldn't solve this problem. But You did it. Great!

  • Kettyking, please explain more about what this is:

    "I have added an option in the admin panel (in usermanagement section) for managing the user's profile icon."

    Is this a special plugin?