The following warnings occurred: | ||||||||||||||||||||||||||||||
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
|
Caching for menu_data function? - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: Developer Discussions (http://get-simple.info/forums/forumdisplay.php?fid=8) +--- Thread: Caching for menu_data function? (/showthread.php?tid=709) |
Caching for menu_data function? - SamWM - 2010-05-15 Since there seem to be a few submenu scripts around and menu_data being a useful function in general, how about implementing some sort of caching for it, so the files aren't loaded each time it is called? It should hopefully be relatively simple to do, what I would do is: set a global variable for the data, use it if it is not NULL, if it is, then load the data into it (code untested), e.g. Code: $menu_data_cache = null; The same kind of thing could be done for other times when you are loading data from xml files. Caching for menu_data function? - Zegnåt - 2010-05-15 Yes, I’m working on a caching for menus actually. But I’m not going to implement it ’til I have rewritten menu_data completely. It can work a lot better as I’ve shown before. I think plugin developers should start thinking about caching in general. |