Issue Type: Performance Improvement Created: 2008-10-29T14:44:34.000+0000 Last Updated: 2011-07-29T05:44:18.000+0000 Status: Resolved Fix version(s): - 1.7.0 (17/Nov/08)
Reporter: Matthew Weier O'Phinney (matthew) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Json_Server
Related issues: Attachments:
Add the ability to cache both Zend_Json_Server SMD and server definitions between requests.
Posted by Matthew Weier O'Phinney (matthew) on 2008-10-30T06:41:14.000+0000
Added Zend_Json_Server_Cache to trunk; same API as Zend_XmlRpc_Server_Cache.
Posted by Wil Sinclair (wil) on 2008-11-13T14:10:02.000+0000
Changing issues in preparation for the 1.7.0 release.
Posted by Bart McLeod (firstname.lastname@example.org) on 2011-07-13T20:42:36.000+0000
Is it possible that the caching does not cache the return type? When I get an SMD in the browser, using a GET request and sample code from the manual, I get the return type right the first time. But on all subsequent requests, I get null as the return type. This happens even after a system crash. Only if I modify the class file that was attached to the server, then the SMD will be correct, again only for one request, on subsequent requests, the return type is null again.
Posted by Matthew Weier O'Phinney (matthew) on 2011-07-28T19:57:43.000+0000
I suppose it's possible -- look through the generated SMD cache and check to see if the return is in there. If not, add a test, and let's fix it. :)
Posted by Bart McLeod (email@example.com) on 2011-07-28T21:35:46.000+0000
I do not know this component very well: where can I find the generated SMD cache?
Posted by Matthew Weier O'Phinney (matthew) on 2011-07-28T21:57:04.000+0000
You pass a Zend_Json_Server instance to Zend_Json_Server_Cache::saveSmd($file, $server). Typically, you'd then grab the SMD from the cache using Zend_Json_Server_Cache::getSmd($file) on subsequent requests, returning it directly to the client. You can therefore check the file generated to see if it contains return information.
Posted by Bart McLeod (firstname.lastname@example.org) on 2011-07-29T05:44:18.000+0000
Thanks for the update!
I did do nothing to cache the SMD explicitly. From your explanation I understand there is no default cache. This makes the behavior even stranger, I wonder if it is specific to certain version of OS and or php. Would anyone else have observerd this?
Have you found an issue?
See the Overview section for more details.