![]() |
Phil sturgeon's REST Server with memcached - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Phil sturgeon's REST Server with memcached (/showthread.php?tid=48267) |
Phil sturgeon's REST Server with memcached - El Forum - 01-10-2012 [eluser]Pedro Correia[/eluser] I've been trying to create a simple REST api for a small project i have going on, using Phils REST Server and it works just fine, except when i tried to integrate memcached to cache database result objects. I have this simple example: Code: // check if the object is in cache If i take out the caching part it works great and i get, as i request a perfectly formated json string. When using caching i get a whitespace before the json string in the response body rendering the request invalid to a REST client. I've scoured the code up and down and found out that commenting out the code that sets the 'Content-Type' header in the REST_Controller, makes the damned whitespace go away, but that's not really a proper fix. Can anyone shed some light on this problem please? Thank you in advance, Pedro Phil sturgeon's REST Server with memcached - El Forum - 07-12-2012 [eluser]Peacemoon[/eluser] STRANGE !!!! I have the same problem with trailing space characters in memcached.php . I try to delete the closed php tags ?> from memchached.php config file, the ajax call is very slow. Does anyone know why? |