29 October, 2008
Zero producivity, anyone? Tonight saw me knee deep in the CakePHP core trying to track down why the bloody hell my passed parameters were not being correctly passed as inputs to the action on a controller. Frustrating to say the least. PhpNut took some time out to explain routing changes, and point me in the right direction. He's extremely helpful, despite his busy schedule.
While I am on the right track, as it stands, the URL parsing of the core isnt passing my args around. If I had a nice codeblock syntaxhighlighting helper, I would be able to show you some cool code, and the different methods I have been attempting to get this corrected... Alas, its just another item on my todo list thats getting done at a frustratingly slow rate.
Today I created the Recent Posts element, as I had intended to. I also approached PhpNut for a good example of the best way to use requestAction in CakePHP without being messy, or overly demanding on the database. He assures me that he will get back with an example. For the moment, I have gone with element caching, and cache resets on save and update on the relevant models.
Essentially, this means that each time you view the recent posts list on the site (yes, that small list of 5 items) it will be red from a cache on disk. This speeds up the site, reduces queries to the database, and makes for a happy, responsive server. It'd be the perfect solution if I could get the requestAction passing my arguments correctly!
Bit of a storm here tonight, and I am up later than I had intended. Lets hope tomorrow is more productive.