I'm a little concerned over computing cost of a feature that I hope some people can give me reassurance :)
I have a sphinx search on documents with some features to both 'favorite' and 'mark as read' on each result returned.
These features which are available require a store of all items marked as either favorited or mark as read.
Favorited max cap is 2000 and mark as read can go 2000+
My theory is to store all the doc_ids in 2 arrays upon login. So my first thought is, is that dangerous to store so many values in a $_SESSION?
Next thought is when the results are returned, I need to run something like the below:
$favorite_link = 'Favorited';
$favorite_link = '<a href="addtofavorites.php">Add to Favorites</a>';
$read_link = 'Marked as Read';
$read_link = '<a href="addtofavorites.php">Mark as Read</a>';
Just need some expert opinion really on the best way of achieving this - trying to avoid db queries where I can
$doc_id's are INTs