about globals, sessions & cookies.
I have a little question here.
I’m building my own component and it will have some filters possibles, eg. to filters the content by “days old” (days_active).
When running a query to show the items, the script would check :
-if the user set a days_active filter
–if not, if the admin set a days_active filter.
My question is:
How must I call the datas ?
I have set all the admin filters in
So to get the admin filter, I would get $bp->mycomponent->options[‘days_active’].
It’s in the global so here it’s rather ok.
Now for the user…
But if I run this each time, it will slow my component…
So where to store it ?
Is it a good idea to store that in sessions ? It could work both for logged in and non logged in users…
OR maybe in sessions for visitors and elsewhere for members ?
Thanks to give me some advices !
- The topic ‘about globals, sessions & cookies.’ is closed to new replies.