My app has an AJAX request on every page load. (Notifications)
This has made the flashdata feature pretty useless for the rest of the code. As you know flashdata is deleted on the next request, and the ajax call deletes my flashdata.
I have worked around this by looping through all the flashdata and calling keep_flashdata() so that the AJAX request doesn't delete any flashdata.
Is there a better way to handle this?
Maybe a way to say
PHP Code:
if($x){
// Set flash data to not delete.
}
Or should I create my own flashdata library so that I can have different sets of flashdata that can have different configurations? The problem with this is third party libraries will all have to modified.