Welcome Guest, Not a member yet? Register   Sign In
How to cache rss pages?
#1

[eluser]Unknown[/eluser]
Hi,

I am trying to cache my rss pages like this:

Code:
public function index()
    {
        $this->output->cache(10);
        $this->output->set_content_type("application/rss+xml");
        $this->load->model("blabla");
        $data["asdfas"] = $this->blabla->ksdf(15);
        $this->load->view("rss",$data);

    }

However, When a page is loaded from cache, codeigniter doesn't send correct headers, thus making rss look like an html page to a browser. Are there any way that I could make this work?

Edit: Setting content type in __construct won't work. I guess ci doesn't even load controller when outputting cached file.




Theme © iAndrew 2016 - Forum software by © MyBB