<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Debuggable.com - Blog</title><link>http://debuggable.com/</link><description /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/thinkingphp" type="application/rss+xml" /><item><title>Debuggable.com 2.0</title><link>http://feedproxy.google.com/~r/thinkingphp/~3/041h3KPzokc/Debuggable_com_2_0:4a5e38b6-1e50-465a-8732-6ddd4834cda3</link><guid isPermaLink="false">http://debuggable.com/posts/Debuggable_com_2_0:4a5e38b6-1e50-465a-8732-6ddd4834cda3</guid><description>&lt;p&gt;We removed our old two-guys-in-a-garage theme and replaced it with the beautiful work of &lt;a href="http://www.fluidcore.net/"&gt;Abhay Singh&lt;/a&gt;. We could have kept the old look, but then we would have also had to buy a garage at some point.&lt;/p&gt;
&lt;p&gt;We are now also offering &lt;a href="/services"&gt;commercial support&lt;/a&gt; for CakePHP, jQuery and Git.&lt;/p&gt;
&lt;p&gt;Let us know what you think. That is other than that we should post more. We got a few goodies queued up already ; ).&lt;/p&gt;
&lt;p&gt;-- Felix Geisendörfer aka the_undefined&lt;/p&gt;
&lt;p&gt;PS: Be careful with our RSS bug, he does not like to be annoyed.&lt;br /&gt;
&lt;img style="display: none;" src="http://debuggable.com/posts/tick/4a5e38b6-1e50-465a-8732-6ddd4834cda3"&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/debuggable/~4/HVcgUZVNJMc" height="1" width="1"/&gt;</description><author>felix@debuggable.com</author><pubDate>Wed, 15 Jul 2009 20:14:46 +0000</pubDate><comments>http://debuggable.com/posts/Debuggable_com_2_0:4a5e38b6-1e50-465a-8732-6ddd4834cda3</comments><feedburner:origLink>http://debuggable.com/posts/Debuggable_com_2_0:4a5e38b6-1e50-465a-8732-6ddd4834cda3</feedburner:origLink><feedburner:origLink>http://feedproxy.google.com/~r/debuggable/~3/HVcgUZVNJMc/Debuggable_com_2_0:4a5e38b6-1e50-465a-8732-6ddd4834cda3</feedburner:origLink></item><item><title>Summary of CakeFest #3 - Berlin</title><link>http://feedproxy.google.com/~r/thinkingphp/~3/t1VGUYCBniE/summary_of_cakefest_3_berlin:4a5ca8fe-0f50-49fe-afc3-3d584834cda3</link><guid isPermaLink="false">http://debuggable.com/posts/summary_of_cakefest_3_berlin:4a5ca8fe-0f50-49fe-afc3-3d584834cda3</guid><description>&lt;p&gt;Hey folks,&lt;/p&gt;
&lt;p&gt;if you are on twitter, you probably heard that &lt;a href="http://search.twitter.com/search?q=%23cakefest"&gt;cakefest #3&lt;/a&gt; was beyond awesome again this time around.&lt;/p&gt;
&lt;p&gt;Amongst other &lt;a href="http://groups.google.com/group/cake-php/browse_thread/thread/134b180ce477b9ef/7868d41614958d02"&gt;things&lt;/a&gt;, Nate spoke about the announcement of &lt;a href="http://code.cakephp.org/cake3"&gt;Cake3&lt;/a&gt; which is a largely rewritten version of CakePHP that works exclusively with PHP5.3+ and takes advantage of all the new features like namespaces and closures. You can already check the source, but hold your breath - this version is many many months away from a release.&lt;/p&gt;
&lt;p&gt;On the first day, Gwoo talked about the more immediate future of CakePHP. CakePHP 2.0 will pretty much be CakePHP 1.2 (ok, actually 1.3) with PHP5 strict-mode compliance. There should be no breaks in backwards computability, but we expect to see a significant performance boost from dropping PHP4 support.&lt;/p&gt;
&lt;p&gt;There was a lot of discussion up front on whether Cake3 should be based on the current core or whether it should be a rewrite like it is now. We hope that the benefits of a new architecture will outweigh the problems of backwards compatibility in the long run. It will certainly be interesting to see the uptake of 5.3 as it is a much more significant revision than the version number would indicate.&lt;/p&gt;
&lt;p&gt;Anyway, back to the past. The conference was preceded by a 2-day workshop. There was some trouble getting started since we intended to hand out a copy of the app we were going to build that had just the design with it, but falling back to an empty core worked as well. Over the 2 days Nate &amp; Mariano did a fantastic job building a twitter-clone from scratch that also interacts with the actual twitter via a datasource and demonstrates many other CakePHP tools. I think we hit an even better compromise of not overloading beginners and making it still attractive to intermediates, but there also seemed to be some demand for an advanced-CakePHP only workshop.&lt;/p&gt;
&lt;p&gt;The conference itself was quite fantastic as well. We had ~70 people at the event, which was a bit of a challenge when trying to pick bars &amp; restaurants at night : ). Pretty much all presentations were fantastic and seemed to be a good mix of different topics.&lt;/p&gt;
&lt;p&gt;Garrett also introduced us to a new gentleman game that he has helped to develop named: &lt;a href="http://forkmaster.com/"&gt;Fork Master&lt;/a&gt;. The game is beyond fantastic and there is an internationally rapidly growing community of players now : ).&lt;/p&gt;
&lt;p&gt;-- Felix Geisendörfer aka the_undefined&lt;/p&gt;
&lt;p&gt;PS: Graham is uploading all &lt;a href="http://cakephp.org/downloads/CakeFest/CakeFest%203%20-%20Berlin%202009"&gt;CakeFest slides&lt;/a&gt; right now as well as &lt;a href="http://cakedc.com/articles"&gt;writing articles covering the talks&lt;/a&gt; in detail.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update 1:&lt;/strong&gt; Just saw that Kevin also has a fantastic post on the &lt;a href="http://kevin.vanzonneveld.net/techblog/article/notes_on_cakefest_3/"&gt;things he picked up at cakefest&lt;/a&gt;.&lt;br /&gt;
&lt;img style="display: none;" src="http://debuggable.com/posts/tick/4a5ca8fe-0f50-49fe-afc3-3d584834cda3"&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/debuggable/~4/ukcVnGyyqYc" height="1" width="1"/&gt;</description><author>felix@debuggable.com</author><pubDate>Wed, 15 Jul 2009 19:09:30 +0000</pubDate><comments>http://debuggable.com/posts/summary_of_cakefest_3_berlin:4a5ca8fe-0f50-49fe-afc3-3d584834cda3</comments><feedburner:origLink>http://debuggable.com/posts/summary_of_cakefest_3_berlin:4a5ca8fe-0f50-49fe-afc3-3d584834cda3</feedburner:origLink><feedburner:origLink>http://feedproxy.google.com/~r/debuggable/~3/ukcVnGyyqYc/summary_of_cakefest_3_berlin:4a5ca8fe-0f50-49fe-afc3-3d584834cda3</feedburner:origLink></item><item><title>Sales Almost Closing for CakeFest#3 in Berlin!</title><link>http://feedproxy.google.com/~r/thinkingphp/~3/5UH776_F4sA/sales-almost-closing-for-cakefest3-in-berlin!:4a52050e-8ab8-4663-b8c8-45b74834cda3</link><guid isPermaLink="false">http://debuggable.com/posts/sales-almost-closing-for-cakefest3-in-berlin!:4a52050e-8ab8-4663-b8c8-45b74834cda3</guid><description>&lt;p&gt;Hey folks,&lt;/p&gt;
&lt;p&gt;There are only &lt;strong&gt;&lt;a href="http://cakefest.org/registrations/add"&gt;around 10 hours left&lt;/a&gt;&lt;/strong&gt; until sales close for the up until now &lt;a href="http://cakefest.org"&gt;biggest CakeFest&lt;/a&gt;. It will take place from Jul 9 until Jul 12 in Debuggable's hometown Berlin, Germany. It is in fact two events in one: A CakePHP workshop and the main conference with talks presented by core developers and community members.&lt;/p&gt;
&lt;h3&gt;The CakePHP Workshop&lt;/h3&gt;
&lt;p&gt;The CakeFest CakePHP Workshop (July 9-10) provides an opportunity for beginner and intermediate developers to jump-start their experience with CakePHP by learning directly from the CakePHP core team. Participants are strongly encouraged to bring their laptops, as they will be learning hands-on how to set up and build CakePHP applications.&lt;/p&gt;
&lt;p&gt;Nate and Mariano will talk about topics including basic application design, expert project workflow techniques, interacting with databases and web services, JavaScript and Ajax, and much more. The presentations are classroom-style allowing participants to follow along and ask questions. &lt;a href="http://cakefest.org/talks"&gt;Check out the workshop schedule&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Felix, others and myself will be on-hand to provide one-on-one help. If you are a designer and the workshop pace is quite fast for you or if you are experienced, but have a difficult architectural problem that you need help with: The workshop and the one-on-ones will get you up and running and will provide all necessary help.&lt;/p&gt;
&lt;h3&gt;The Main Conference&lt;/h3&gt;
&lt;p&gt;The CakeFest Conference (July 11-12) is the primere event for CakePHP developers of all levels to meet, socialize, and learn collaboratively. Attendees will be immersed in a collective learning environment where some of the coolest ideas of the CakePHP community will be discussed and presented.&lt;/p&gt;
&lt;p&gt;Topics include - but aren't limited to - &lt;a href="http://cakefest.org/talks"&gt;Demystifying Webservices in CakePHP&lt;/a&gt;, &lt;a href="http://cakefest.org/talks"&gt;Building Custom APIs&lt;/a&gt; and &lt;a href="http://cakefest.org/talks"&gt;JavaScript for PHP Developers&lt;/a&gt;. &lt;a href="http://cakefest.org/talks"&gt;Check out the full schedule&lt;/a&gt; and head on over and &lt;a href="http://cakefest.org/registrations/add"&gt;get your ticket&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;What do we do in the evenings?&lt;/h3&gt;
&lt;p&gt;The evenings will be packed with fun dinners, bar visits and club visits. If you thought discussions would end then you are wrong. The CakeFests from the past proved to have very enjoyable evenings with fun action going on.&lt;/p&gt;
&lt;h3&gt;How many folks will be there?&lt;/h3&gt;
&lt;p&gt;Just to give you an idea about how many folks will be attending. As of now there are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;9 people from the CakePHP Development Team&lt;/li&gt;
&lt;li&gt;35 people attending the workshop&lt;/li&gt;
&lt;li&gt;62 people attending the conference&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;.. attending.&lt;/p&gt;
&lt;p&gt;So you can see, there are tons of opportunities to network, discuss and learn about new and old things. You will be able to meet core team members and discuss your applications, experience and wishes with them. In the evenings we will hang out, drink one or two beers, and just have fun! And all of that &lt;a href="http://cakefest.org/registrations/add"&gt;at affordable prices&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;So, what are you waiting for? Hop on over and &lt;a href="http://cakefest.org/registrations/add"&gt;grab your ticket&lt;/a&gt;. :)&lt;/p&gt;
&lt;p&gt;See you all there!&lt;/p&gt;
&lt;p&gt;-- Tim Koschuetzki aka DarkAngelBGE&lt;br /&gt;
&lt;img style="display: none;" src="http://debuggable.com/posts/tick/4a52050e-8ab8-4663-b8c8-45b74834cda3"&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/debuggable/~4/ueysFvCWPVQ" height="1" width="1"/&gt;</description><author>tim@debuggable.com</author><pubDate>Mon, 06 Jul 2009 21:59:18 +0000</pubDate><comments>http://debuggable.com/posts/sales-almost-closing-for-cakefest3-in-berlin!:4a52050e-8ab8-4663-b8c8-45b74834cda3</comments><feedburner:origLink>http://debuggable.com/posts/sales-almost-closing-for-cakefest3-in-berlin!:4a52050e-8ab8-4663-b8c8-45b74834cda3</feedburner:origLink><feedburner:origLink>http://feedproxy.google.com/~r/debuggable/~3/ueysFvCWPVQ/sales-almost-closing-for-cakefest3-in-berlin!:4a52050e-8ab8-4663-b8c8-45b74834cda3</feedburner:origLink></item><item><title>CouchDB Insert Benchmarks</title><link>http://feedproxy.google.com/~r/thinkingphp/~3/ymvgezuKn2c/couchdb-insert-benchmarks:4a4365e2-9d04-4170-9f88-2de34834cda3</link><guid isPermaLink="false">http://debuggable.com/posts/couchdb-insert-benchmarks:4a4365e2-9d04-4170-9f88-2de34834cda3</guid><description>&lt;p&gt;Hey folks,&lt;/p&gt;
&lt;p&gt;I am currently working on replacing Amazon S3 as the key value storage service for Debuggable's new startup. The main reason for that choice is that we want the ability to license the technology for in-house usage, which means the S3 dependency has to go.&lt;/p&gt;
&lt;p&gt;Over the past year or so I have repeatedly heard good things about CouchDB (not to mention that Damien Katz became a personal hero of mine after seeing &lt;a href="http://www.infoq.com/presentations/katz-couchdb-and-me"&gt;this video&lt;/a&gt;). But the main reason for preferring CouchDB over all the &lt;a href="http://www.metabrew.com/article/anti-rdbms-a-list-of-distributed-key-value-stores/"&gt;alternative key value stores&lt;/a&gt; is CouchDB's simplicity. Using HTTP + JSON as the protocol and embracing complete RESTfulness makes getting started with CouchDB ridiculously easy. It also makes it very awesome as you can build your architecture with other HTTP tools such as reverse proxies, http load balancers, etc..&lt;/p&gt;
&lt;p&gt;Anyway, having done absolutely nothing with CouchDB before, I feel I should avoid shooting myself in the foot by making poor performance / scaling assumptions that may or may not be true for our particular use cases. So I did what every new user of an open source project &lt;del&gt;would&lt;/del&gt; &lt;add&gt;should&lt;/add&gt; do and setup some benchmarks.&lt;/p&gt;
&lt;p&gt;However, the whole point of these is not to find out how fast CouchDB really is - I don't care as long as it scales horizontally. No, I am mostly interested in finding out 2 things:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a) How much slacking time do I have left before we seriously need to scale out to multiple CouchDB nodes&lt;/li&gt;
&lt;li&gt;b) When that day comes, what can we expect in terms of replication delay (eventual consistency) in a multi-master setup&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So far I have been mostly studying question a). Since our application is mostly storage heavy, but does not necessarily have lots of read hits (see, this is the point where you should realize my tests might not help answer your questions at all - sorry), I was wondering about the disk space consumption relative to the number of documents stored in the database.&lt;/p&gt;
&lt;p&gt;After reading a bit about the &lt;a href="http://en.wikipedia.org/wiki/B%2B_tree"&gt;B+ tree&lt;/a&gt; CouchDB uses for storage, I assumed that the required disk space would grow linear with the number of documents stored. However, my initial tests indicated that the disk space / document was growing with each document I was adding. Assuming a bad setup and after discussing this a bit in #couchdb, I decided to create a more serious setup on Amazon Ec2 inserting anywhere from 0 - 1 million records.&lt;/p&gt;
&lt;p&gt;I put all the code for setting up the environment and running the tests on GitHub, see my &lt;a href="http://github.com/felixge/couchdb-benchmarks/tree/master"&gt;couchdb-benchmarks&lt;/a&gt; project.&lt;/p&gt;
&lt;p&gt;Anyway you waited long enough. Time for my initial results:&lt;/p&gt;
&lt;pre class="terminal"&gt;doc count (before compact): 0
doc count (after compact): 0
insert time: 0 sec
insert time / doc: n/a ms
compact time: 1.0064 sec
compact time / doc: n/a ms
disk size (before compact): 79 bytes
disk size (after compact): 79 bytes
.couch size (before compact): 79 bytes
.couch size (after compact): 79 bytes
.couch size / doc (before compact): n/a bytes
.couch size / doc (after compact): n/a bytes

doc count (before compact): 1
doc count (after compact): 1
insert time: 0.0015 sec
insert time / doc: 1.46 ms
compact time: 1.0051 sec
compact time / doc: 1005.14 ms
disk size (before compact): 315 bytes
disk size (after compact): 4179 bytes
.couch size (before compact): 315 bytes
.couch size (after compact): 4179 bytes
.couch size / doc (before compact): 315 bytes
.couch size / doc (after compact): 4179 bytes

doc count (before compact): 2
doc count (after compact): 2
insert time: 0.0015 sec
insert time / doc: 0.75 ms
compact time: 1.0057 sec
compact time / doc: 502.87 ms
disk size (before compact): 503 bytes
disk size (after compact): 8281 bytes
.couch size (before compact): 503 bytes
.couch size (after compact): 8281 bytes
.couch size / doc (before compact): 251.5 bytes
.couch size / doc (after compact): 4140.5 bytes

doc count (before compact): 3
doc count (after compact): 3
insert time: 0.0017 sec
insert time / doc: 0.56 ms
compact time: 1.0053 sec
compact time / doc: 335.1 ms
disk size (before compact): 693 bytes
disk size (after compact): 8281 bytes
.couch size (before compact): 693 bytes
.couch size (after compact): 8281 bytes
.couch size / doc (before compact): 231 bytes
.couch size / doc (after compact): 2760.33 bytes

doc count (before compact): 4
doc count (after compact): 4
insert time: 0.0017 sec
insert time / doc: 0.44 ms
compact time: 1.0053 sec
compact time / doc: 251.33 ms
disk size (before compact): 883 bytes
disk size (after compact): 8281 bytes
.couch size (before compact): 883 bytes
.couch size (after compact): 8281 bytes
.couch size / doc (before compact): 220.75 bytes
.couch size / doc (after compact): 2070.25 bytes

doc count (before compact): 5
doc count (after compact): 5
insert time: 0.0018 sec
insert time / doc: 0.36 ms
compact time: 1.0054 sec
compact time / doc: 201.08 ms
disk size (before compact): 1071 bytes
disk size (after compact): 8281 bytes
.couch size (before compact): 1071 bytes
.couch size (after compact): 8281 bytes
.couch size / doc (before compact): 214.2 bytes
.couch size / doc (after compact): 1656.2 bytes

doc count (before compact): 6
doc count (after compact): 6
insert time: 0.0019 sec
insert time / doc: 0.32 ms
compact time: 1.0051 sec
compact time / doc: 167.52 ms
disk size (before compact): 1261 bytes
disk size (after compact): 8281 bytes
.couch size (before compact): 1261 bytes
.couch size (after compact): 8281 bytes
.couch size / doc (before compact): 210.17 bytes
.couch size / doc (after compact): 1380.17 bytes

doc count (before compact): 7
doc count (after compact): 7
insert time: 0.0021 sec
insert time / doc: 0.3 ms
compact time: 1.005 sec
compact time / doc: 143.57 ms
disk size (before compact): 1459 bytes
disk size (after compact): 8281 bytes
.couch size (before compact): 1459 bytes
.couch size (after compact): 8281 bytes
.couch size / doc (before compact): 208.43 bytes
.couch size / doc (after compact): 1183 bytes

doc count (before compact): 8
doc count (after compact): 8
insert time: 0.0022 sec
insert time / doc: 0.27 ms
compact time: 1.0049 sec
compact time / doc: 125.61 ms
disk size (before compact): 1655 bytes
disk size (after compact): 8281 bytes
.couch size (before compact): 1655 bytes
.couch size (after compact): 8281 bytes
.couch size / doc (before compact): 206.88 bytes
.couch size / doc (after compact): 1035.13 bytes

doc count (before compact): 9
doc count (after compact): 9
insert time: 0.0023 sec
insert time / doc: 0.25 ms
compact time: 1.0053 sec
compact time / doc: 111.7 ms
disk size (before compact): 1849 bytes
disk size (after compact): 8281 bytes
.couch size (before compact): 1849 bytes
.couch size (after compact): 8281 bytes
.couch size / doc (before compact): 205.44 bytes
.couch size / doc (after compact): 920.11 bytes

doc count (before compact): 10
doc count (after compact): 10
insert time: 0.0025 sec
insert time / doc: 0.25 ms
compact time: 1.0042 sec
compact time / doc: 100.42 ms
disk size (before compact): 2043 bytes
disk size (after compact): 8281 bytes
.couch size (before compact): 2043 bytes
.couch size (after compact): 8281 bytes
.couch size / doc (before compact): 204.3 bytes
.couch size / doc (after compact): 828.1 bytes

doc count (before compact): 50
doc count (after compact): 50
insert time: 0.0072 sec
insert time / doc: 0.14 ms
compact time: 1.0038 sec
compact time / doc: 20.08 ms
disk size (before compact): 10319 bytes
disk size (after compact): 16473 bytes
.couch size (before compact): 10319 bytes
.couch size (after compact): 16473 bytes
.couch size / doc (before compact): 206.38 bytes
.couch size / doc (after compact): 329.46 bytes

doc count (before compact): 100
doc count (after compact): 100
insert time: 0.0136 sec
insert time / doc: 0.14 ms
compact time: 1.0054 sec
compact time / doc: 10.05 ms
disk size (before compact): 20430 bytes
disk size (after compact): 24665 bytes
.couch size (before compact): 20430 bytes
.couch size (after compact): 24665 bytes
.couch size / doc (before compact): 204.3 bytes
.couch size / doc (after compact): 246.65 bytes

doc count (before compact): 500
doc count (after compact): 500
insert time: 0.0687 sec
insert time / doc: 0.14 ms
compact time: 1.0062 sec
compact time / doc: 2.01 ms
disk size (before compact): 104616 bytes
disk size (after compact): 110690 bytes
.couch size (before compact): 104616 bytes
.couch size (after compact): 110690 bytes
.couch size / doc (before compact): 209.23 bytes
.couch size / doc (after compact): 221.38 bytes

doc count (before compact): 1000
doc count (after compact): 1000
insert time: 0.1361 sec
insert time / doc: 0.14 ms
compact time: 1.003 sec
compact time / doc: 1 ms
disk size (before compact): 212260 bytes
disk size (after compact): 217186 bytes
.couch size (before compact): 212260 bytes
.couch size (after compact): 217186 bytes
.couch size / doc (before compact): 212.26 bytes
.couch size / doc (after compact): 217.19 bytes

doc count (before compact): 2500
doc count (after compact): 2500
insert time: 0.4686 sec
insert time / doc: 0.19 ms
compact time: 1.006 sec
compact time / doc: 0.4 ms
disk size (before compact): 814957 bytes
disk size (after compact): 819298 bytes
.couch size (before compact): 814957 bytes
.couch size (after compact): 819298 bytes
.couch size / doc (before compact): 325.98 bytes
.couch size / doc (after compact): 327.72 bytes

doc count (before compact): 5000
doc count (after compact): 5000
insert time: 0.9165 sec
insert time / doc: 0.18 ms
compact time: 1.0065 sec
compact time / doc: 0.2 ms
disk size (before compact): 2012394 bytes
disk size (after compact): 2015330 bytes
.couch size (before compact): 2012394 bytes
.couch size (after compact): 2015330 bytes
.couch size / doc (before compact): 402.48 bytes
.couch size / doc (after compact): 403.07 bytes

doc count (before compact): 7500
doc count (after compact): 7500
insert time: 1.5116 sec
insert time / doc: 0.2 ms
compact time: 2.0112 sec
compact time / doc: 0.27 ms
disk size (before compact): 3778774 bytes
disk size (after compact): 3797090 bytes
.couch size (before compact): 3778774 bytes
.couch size (after compact): 3797090 bytes
.couch size / doc (before compact): 503.84 bytes
.couch size / doc (after compact): 506.28 bytes

doc count (before compact): 10000
doc count (after compact): 10000
insert time: 2.3111 sec
insert time / doc: 0.23 ms
compact time: 3.015 sec
compact time / doc: 0.3 ms
disk size (before compact): 5653905 bytes
disk size (after compact): 5652578 bytes
.couch size (before compact): 5653905 bytes
.couch size (after compact): 5652578 bytes
.couch size / doc (before compact): 565.39 bytes
.couch size / doc (after compact): 565.26 bytes

doc count (before compact): 25000
doc count (after compact): 25000
insert time: 6.8684 sec
insert time / doc: 0.27 ms
compact time: 7.0746 sec
compact time / doc: 0.28 ms
disk size (before compact): 20595235 bytes
disk size (after compact): 20635746 bytes
.couch size (before compact): 20595235 bytes
.couch size (after compact): 20635746 bytes
.couch size / doc (before compact): 823.81 bytes
.couch size / doc (after compact): 825.43 bytes

doc count (before compact): 50000
doc count (after compact): 50000
insert time: 15.8227 sec
insert time / doc: 0.32 ms
compact time: 14.1612 sec
compact time / doc: 0.28 ms
disk size (before compact): 51808040 bytes
disk size (after compact): 51724386 bytes
.couch size (before compact): 51808040 bytes
.couch size (after compact): 51724386 bytes
.couch size / doc (before compact): 1036.16 bytes
.couch size / doc (after compact): 1034.49 bytes

doc count (before compact): 100000
doc count (after compact): 100000
insert time: 35.3071 sec
insert time / doc: 0.35 ms
compact time: 33.4723 sec
compact time / doc: 0.33 ms
disk size (before compact): 125497442 bytes
disk size (after compact): 125419618 bytes
.couch size (before compact): 125497442 bytes
.couch size (after compact): 125419618 bytes
.couch size / doc (before compact): 1254.97 bytes
.couch size / doc (after compact): 1254.2 bytes

doc count (before compact): 250000
doc count (after compact): 250000
insert time: 104.0009 sec
insert time / doc: 0.42 ms
compact time: 97.3738 sec
compact time / doc: 0.39 ms
disk size (before compact): 394489375 bytes
disk size (after compact): 394457190 bytes
.couch size (before compact): 394489375 bytes
.couch size (after compact): 394457190 bytes
.couch size / doc (before compact): 1577.96 bytes
.couch size / doc (after compact): 1577.83 bytes

doc count (before compact): 500000
doc count (after compact): 500000
insert time: 230.6021 sec
insert time / doc: 0.46 ms
compact time: 209.0139 sec
compact time / doc: 0.42 ms
disk size (before compact): 900271866 bytes
disk size (after compact): 900280422 bytes
.couch size (before compact): 900271866 bytes
.couch size (after compact): 900280422 bytes
.couch size / doc (before compact): 1800.54 bytes
.couch size / doc (after compact): 1800.56 bytes

doc count (before compact): 750000
doc count (after compact): 750000
insert time: 354.7959 sec
insert time / doc: 0.47 ms
compact time: 380.9895 sec
compact time / doc: 0.51 ms
disk size (before compact): 1446452532 bytes
disk size (after compact): 1445376102 bytes
.couch size (before compact): 1446452532 bytes
.couch size (after compact): 1445376102 bytes
.couch size / doc (before compact): 1928.6 bytes
.couch size / doc (after compact): 1927.17 bytes

doc count (before compact): 1000000
doc count (after compact): 1000000
insert time: 487.3284 sec
insert time / doc: 0.49 ms
compact time: 570.2633 sec
compact time / doc: 0.57 ms
disk size (before compact): 2023280441 bytes
disk size (after compact): 2022334566 bytes
.couch size (before compact): 2023280441 bytes
.couch size (after compact): 2022334566 bytes
.couch size / doc (before compact): 2023.28 bytes
.couch size / doc (after compact): 2022.33 bytes&lt;/pre&gt;
&lt;p&gt;From this data, a few assumptions can be made:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CouchDB inserts ~2-3k documents / second in a &gt;100k documents database (for this particular hardware / benchmark setup)&lt;/li&gt;
&lt;li&gt;CouchDB inserts get slower on bigger databases&lt;/li&gt;
&lt;li&gt;CouchDB seems to use more bytes / document the larger the database gets (this is scary, but might explain the previous 2 observations)&lt;/li&gt;
&lt;li&gt;The time it takes for compacting a database with identical, unmodified documents seems to be almost equal to the time it took to insert the initial documents. Makes lots of sense assuming the writes are I/O bound.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now since I am new to CouchDB there is a very large chance for problems with my setup and the logic behind my assumptions. However, I hope that by sharing them I can get feedback to make the benchmarks better and provide explanations for the observed characteristics.&lt;/p&gt;
&lt;p&gt;I also hope that some of you might feel compelled to &lt;a href="http://github.com/felixge/couchdb-benchmarks/tree/master"&gt;fork the project&lt;/a&gt; on GitHub and provide more benchmarks. Personally I am going to work on analyzing replication next. If I find time I'll also add some CSV exports and pretty rendering facilities with some google charts.&lt;/p&gt;
&lt;p&gt;Comment if you have any thoughts, want to see more tests or share some religious propaganda related to your key-value storage system of choice : ).&lt;/p&gt;
&lt;p&gt;-- Felix Geisendörfer aka the_undefined&lt;/p&gt;
&lt;p&gt;PS: A few questions I can already see coming up:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why does compact always take at least 1 second?&lt;/strong&gt;&lt;br /&gt;
Because I use a while() loop with sleep(1) to determine when compact is done. I could check more frequently, but its not really a variable I'm interested in.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why does compact increase the file size for &lt; 50000 documents?&lt;/strong&gt;&lt;br /&gt;
Good question, I have no idea. Anybody?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What insert method is used?&lt;/strong&gt;&lt;br /&gt;
Have a look at the &lt;a href="http://github.com/felixge/couchdb-benchmarks/tree/master"&gt;benchmark source&lt;/a&gt;. Basically it's bulk-inserts of 1000 items at a time with pre-generated UUIDs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I ran the benchmark and got some additional output&lt;/strong&gt;&lt;br /&gt;
Yeah, I removed some debugging / activity indicators to make the results more readable for this article.&lt;br /&gt;
&lt;img style="display: none;" src="http://debuggable.com/posts/tick/4a4365e2-9d04-4170-9f88-2de34834cda3"&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/debuggable/~4/2lygRR4zaUI" height="1" width="1"/&gt;</description><author>felix@debuggable.com</author><pubDate>Thu, 25 Jun 2009 13:30:41 +0000</pubDate><comments>http://debuggable.com/posts/couchdb-insert-benchmarks:4a4365e2-9d04-4170-9f88-2de34834cda3</comments><feedburner:origLink>http://debuggable.com/posts/couchdb-insert-benchmarks:4a4365e2-9d04-4170-9f88-2de34834cda3</feedburner:origLink><feedburner:origLink>http://feedproxy.google.com/~r/debuggable/~3/2lygRR4zaUI/couchdb-insert-benchmarks:4a4365e2-9d04-4170-9f88-2de34834cda3</feedburner:origLink></item><item><title>Final CakeFest Schedule Announced!</title><link>http://feedproxy.google.com/~r/thinkingphp/~3/8egq0Hcw8ck/final-cakefest-schedule-announced!:4a41de75-29c8-4795-b52f-64e34834cda3</link><guid isPermaLink="false">http://debuggable.com/posts/final-cakefest-schedule-announced!:4a41de75-29c8-4795-b52f-64e34834cda3</guid><description>&lt;p&gt;Hey folks,&lt;/p&gt;
&lt;p&gt;the final schedule for the upcoming CakePHP Conference - our beloved  "CakeFest" - is announced! For those of you who don't know about the event yet, here is a little wrapup.&lt;/p&gt;
&lt;p&gt;The next and third CakeFest will be held in Berlin, hometown of Debuggable! From July 9-12, people from all over Europe and the rest of the world will travel to Germany in order to celebrate and learn about the best PHP framework there is. Throughout the day you will learn a lot about:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;.. how you can tweek your application to run faster&lt;/li&gt;
&lt;li&gt;.. how to write cleaner code&lt;/li&gt;
&lt;li&gt;.. how to make your code ready for the real world&lt;/li&gt;
&lt;li&gt;.. how you can just become a better CakePHP developer&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The evenings are packed with fun events .. dinner with the Core Team, going to bars, chatting about this and that and programming. And more.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You don't want to miss this event! :)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you have not attended a CakeFest so far, here are some cool memories from the past:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://debuggable.com/posts/cakefest-orlando-2008-summary:480f4dd6-6404-4774-a771-4e8fcbdd56cb"&gt;CakeFest #1 (Orlando)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://debuggable.com/posts/cakefest-buenos-aires-2008:493eb5ea-6db8-4688-a230-5fc84834cda3"&gt;CakeFest #2 (Buenos Aires)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Raleigh Workshop (&lt;a href="http://debuggable.com/posts/workshop-day-1-missed-blog-post:48c3cd72-b924-40e2-ac52-6d504834cda3"&gt;Day 1&lt;/a&gt;, &lt;a href="http://debuggable.com/posts/workshop-day-2:48c51df7-4fd4-4906-8b1f-6ed64834cda3"&gt;Day 2&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The event consists of two parts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;July 9-10: CakePHP Workshop - (Lead by the CakePHP core team)&lt;/li&gt;
&lt;li&gt;July 11-12: CakePHP Conference - (Presented by the core team + community)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In order to check out the full schedule with the talks and their speakers, head on over to &lt;a href="http://cakefest.org"&gt;the official CakeFest site&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Hope to see you all there!&lt;/p&gt;
&lt;p&gt;-- Tim Koschützki aka DarkAngelBGE&lt;br /&gt;
&lt;img style="display: none;" src="http://debuggable.com/posts/tick/4a41de75-29c8-4795-b52f-64e34834cda3"&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/debuggable/~4/moY9vmKN_1Q" height="1" width="1"/&gt;</description><author>tim@debuggable.com</author><pubDate>Wed, 24 Jun 2009 11:23:54 +0000</pubDate><comments>http://debuggable.com/posts/final-cakefest-schedule-announced!:4a41de75-29c8-4795-b52f-64e34834cda3</comments><feedburner:origLink>http://debuggable.com/posts/final-cakefest-schedule-announced!:4a41de75-29c8-4795-b52f-64e34834cda3</feedburner:origLink><feedburner:origLink>http://feedproxy.google.com/~r/debuggable/~3/moY9vmKN_1Q/final-cakefest-schedule-announced!:4a41de75-29c8-4795-b52f-64e34834cda3</feedburner:origLink></item><item><title>[JOB] Senior CakePHP position with english360.com</title><link>http://feedproxy.google.com/~r/thinkingphp/~3/EAwvQIHbSpA/[job]-senior-cakephp-position-with-english360.com:4a3bcdf2-7b28-405f-bbe1-7fb54834cda3</link><guid isPermaLink="false">http://debuggable.com/posts/[job]-senior-cakephp-position-with-english360.com:4a3bcdf2-7b28-405f-bbe1-7fb54834cda3</guid><description>&lt;p&gt;Hey there,&lt;/p&gt;
&lt;p&gt;if you are looking for a fantastic full-time opportunity to write CakePHP code, check out this position with english360.com:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;We’re a unique combination: an e-learning startup looking to shake things up through innovation, recently partnered with one of the oldest, most prestigious educational publishers in the world, Cambridge University Press.&lt;/p&gt;
&lt;p&gt;Our flagship web application is now at version 1, and we are looking for a senior PHP developer with the desire and attitude to take the technology lead within English360. Have no fear of a poor code base: the initial application has been developed by the Cake Development Corporation, the frameworks largest contributors.&lt;/p&gt;
&lt;p&gt;Now we are looking for you:&lt;/p&gt;
&lt;p&gt;You’re a world-class PHP developer who has previous experience with CakePHP, or the ambition to pick it up from the folks who wrote it. You are a testing / Q&amp;A fanatic, proficient in jQuery/HTML/CSS, and a SysAdmin wizard.&lt;/p&gt;
&lt;p&gt;After a 6-month, full-time contractor role, you would take full responsibility for the technology side of the company, manage contractors, build your department, and collaborate with senior management on the future direction of our products. Ideally you would also be located in, or willing to relocate to either our New York City or Cambridge offices, after successful completion of your contract.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Interested? Contact e360jobs@gmail.com and impress them with a fantastic cover letter and a list of previous work!&lt;/p&gt;
&lt;p&gt;-- Felix Geisendörfer aka the_undefined&lt;br /&gt;
&lt;img style="display: none;" src="http://debuggable.com/posts/tick/4a3bcdf2-7b28-405f-bbe1-7fb54834cda3"&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/debuggable/~4/q1WpC6WR8lA" height="1" width="1"/&gt;</description><author>felix@debuggable.com</author><pubDate>Mon, 22 Jun 2009 13:50:28 +0000</pubDate><comments>http://debuggable.com/posts/[job]-senior-cakephp-position-with-english360.com:4a3bcdf2-7b28-405f-bbe1-7fb54834cda3</comments><feedburner:origLink>http://debuggable.com/posts/[job]-senior-cakephp-position-with-english360.com:4a3bcdf2-7b28-405f-bbe1-7fb54834cda3</feedburner:origLink><feedburner:origLink>http://feedproxy.google.com/~r/debuggable/~3/q1WpC6WR8lA/[job]-senior-cakephp-position-with-english360.com:4a3bcdf2-7b28-405f-bbe1-7fb54834cda3</feedburner:origLink></item><item><title>What is a Testcase - especially in CakePHP?</title><link>http://feedproxy.google.com/~r/thinkingphp/~3/WmVL5H2MkZY/what-is-a-test-case-especially-in-cakephp:4a2e86b5-015c-4536-aec1-5cf04834cda3</link><guid isPermaLink="false">http://debuggable.com/posts/what-is-a-test-case-especially-in-cakephp:4a2e86b5-015c-4536-aec1-5cf04834cda3</guid><description>&lt;p&gt;Hey folks,&lt;/p&gt;
&lt;p&gt;it's amazing how many people on the public CakePHP irc channel don't know what a test case is. This has to stop. To clear up some confusion, let's have a look at it.&lt;/p&gt;
&lt;h3&gt;What is a Test Case? A Possible Definition&lt;/h3&gt;
&lt;p&gt;This is what wikipedia has to say about a testcase:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;
A test case in software engineering is a set of conditions or variables under which a tester will determine whether an application or software system is working correctly or not. The mechanism for determining whether a software program or system has passed or failed such a test is known as a test oracle. In some settings, an oracle could be a requirement or use case, while in others it could be a heuristic. It may take many test cases to determine that a software program or system is functioning correctly. Test cases are often referred to as test scripts, particularly when written. Written test cases are usually collected into test suites.
&lt;/p&gt;&lt;/blockquote&gt;
&lt;h3&gt;So is this me testing stuff in my browser?&lt;/h3&gt;
&lt;p&gt;Yes and no. The definition does not necessarily imply that a testcase has anything to do with &lt;a href="http://debuggable.com/posts/unit-testing-in-cakephp-part-1---introduction-to-unit-testing:48102610-c5d0-4398-a010-76974834cda3"&gt;Unit Testing&lt;/a&gt;, or other testing approaches.&lt;/p&gt;
&lt;p&gt;You testing your menu bar's javascript in several browsers in different resolutions can also be considered to be a testcase (or many for that matter) according to the definition. However, most of the time a testcase is meant to be a written test. When it comes to CakePHP, it's mainly a &lt;a href="http://en.wikipedia.org/wiki/Unit_Test"&gt;Unit Test&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Where can I learn about test cases?&lt;/h3&gt;
&lt;p&gt;There are a ton of resources on the web for tests. If you are looking for material for CakePHP, try out these:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The Article &lt;a href="http://debuggable.com/posts/unit-testing-in-cakephp-part-1---introduction-to-unit-testing:48102610-c5d0-4398-a010-76974834cda3"&gt;"Introduction to Unit Testing Part 1"&lt;/a&gt; written by yours truly&lt;/li&gt;
&lt;li&gt;The &lt;a href="http://book.cakephp.org/view/160/Testing"&gt;CakePHP CookBook Chapter on Testing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://book.cakephp.org/view/363/Testing-models"&gt;Your First Testcase&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Mark Story's &lt;a href="http://mark-story.com/downloads/view/unit-testing-cakefest-argentina"&gt;Unit Testing Talk Slide for CakeFest Argentinia December 2009&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;My slides for the &lt;a href="http://debuggable.com/posts/slides-for-my-cakephp-unit-testing-talk:480f4dfe-4880-4b82-9a52-4bd8cbdd56cb"&gt;Unit Testing Talk for CakeFest Orlando February 2008&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Lets get a discussion started to clear up confusion.&lt;/p&gt;
&lt;p&gt;-- Tim Koschuetzki aka DarkAngelBGE&lt;br /&gt;
&lt;img style="display: none;" src="http://debuggable.com/posts/tick/4a2e86b5-015c-4536-aec1-5cf04834cda3"&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/debuggable/~4/AKs8eskS08I" height="1" width="1"/&gt;</description><author>tim@debuggable.com</author><pubDate>Tue, 09 Jun 2009 16:16:39 +0000</pubDate><comments>http://debuggable.com/posts/what-is-a-test-case-especially-in-cakephp:4a2e86b5-015c-4536-aec1-5cf04834cda3</comments><feedburner:origLink>http://debuggable.com/posts/what-is-a-test-case-especially-in-cakephp:4a2e86b5-015c-4536-aec1-5cf04834cda3</feedburner:origLink><feedburner:origLink>http://feedproxy.google.com/~r/debuggable/~3/AKs8eskS08I/what-is-a-test-case-especially-in-cakephp:4a2e86b5-015c-4536-aec1-5cf04834cda3</feedburner:origLink></item><item><title>Migrating a Database Table for use with the CakePHP Sluggable Behavior</title><link>http://feedproxy.google.com/~r/thinkingphp/~3/TJlswOnCydE/migrating-a-database-table-for-use-with-the-cakephp-sluggable-behavior:4a2cee35-0e24-4d73-a545-3f514834cda3</link><guid isPermaLink="false">http://debuggable.com/posts/migrating-a-database-table-for-use-with-the-cakephp-sluggable-behavior:4a2cee35-0e24-4d73-a545-3f514834cda3</guid><description>&lt;p&gt;Hey folks,&lt;/p&gt;
&lt;p&gt;if you are not familiar with &lt;a href="http://bakery.cakephp.org/articles/view/sluggable-behavior"&gt;Mariano's Sluggable Behavior&lt;/a&gt;, you should definitely check it out. It's a nice tool to generate SEO-friendly urls in your application. If you are anything like debuggable.com with our long urls, you might want to look at it. ;)&lt;/p&gt;
&lt;p&gt;If you don't know what a url slug is:&lt;/p&gt;
&lt;p&gt;A slug is a few words that describe a post or a page. Slugs are usually a URL friendly version of the post title, but a slug can be anything you like. Slugs are meant to be used with your site's urls as they help describe what the content at the URL is. They might or might not help your SEO ranking as well for the keywords in the slug/content.&lt;/p&gt;
&lt;p&gt;Example post url: &lt;a href="http://flashfun247.com/games/play/racing/tg-motocross-2"&gt;http://flashfun247.com/games/play/racing/tg-motocross-2&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The slug for that game content is "tg-motocross-2".&lt;/p&gt;
&lt;p&gt;This blogpost deals with migrating an existing production table into using Mariano's sluggable behavior and thereby increasing SEO friendliness of your site.&lt;/p&gt;
&lt;h3&gt;Step 1: Back up the database table&lt;/h3&gt;
&lt;p&gt;Back up the table for which you want to add slugs. We cannot be blamed for any database damage this might cause.&lt;/p&gt;
&lt;h3&gt;Step 2: Modify your database&lt;/h3&gt;
&lt;p&gt;Add a "slug" field to the table. The default length that the behavior uses is 100 chars which should be enough in most cases. So VARCHAR(100) is what you need or the equivalent for your db driver.&lt;/p&gt;
&lt;h3&gt;Step 3: Add your $actsAs declaration&lt;/h3&gt;
&lt;p&gt;Add the proper call to $actsAs to the model that you want to migrate. Put in any existing behaviors that you need as well:&lt;/p&gt;
&lt;div class="clear"&gt;&lt;/div&gt;
&lt;div class="code debuggable_sh_php" style="white-space: wrap;white-space: nowrap;"&gt;&lt;span class="kw2"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;
&lt;span class="kw2"&gt;var&lt;/span&gt; &lt;span class="re0"&gt;$actsAs&lt;/span&gt; = &lt;a href="http://www.php.net/array"&gt;&lt;span class="kw3"&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &lt;span class="st0"&gt;'Containable'&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &lt;span class="st0"&gt;'Lookupable'&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &lt;span class="st0"&gt;'Sluggable'&lt;/span&gt; =&amp;gt; &lt;a href="http://www.php.net/array"&gt;&lt;span class="kw3"&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;'overwrite'&lt;/span&gt; =&amp;gt; &lt;span class="kw2"&gt;true&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&lt;span class="kw2"&gt;?&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;Make sure to set the overwrite option, as otherwise the behavior will refuse to overwrite the slug field the way we will do it. Also make sure to set the 'label' option if the table field that your slugs will depend on is not called 'title'.&lt;/p&gt;
&lt;p&gt;For the full host of options, &lt;a href="http://bakery.cakephp.org/articles/view/sluggable-behavior"&gt;check the sluggable behavior&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; The field your slugs depend on (title, name or combinations) MUST NOT be empty for any row in your table. The shell takes this into account and provides you with an error log. To save you some headaches, make sure the fields are properly filled before you run the sluggish shell.&lt;/p&gt;
&lt;h3&gt;Step 4: Modify The Sluggable Behavior Code&lt;/h3&gt;
&lt;p&gt;You need to change the Sluggable behavior code on two occurances to make it work with the recent Cake releases.&lt;/p&gt;
&lt;p&gt;1. Change Line 121 to:&lt;/p&gt;
&lt;div class="clear"&gt;&lt;/div&gt;
&lt;div class="code debuggable_sh_php" style="white-space: wrap;white-space: nowrap;"&gt;&lt;span class="kw2"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;
&lt;span class="re0"&gt;$conditions&lt;/span&gt; = &lt;a href="http://www.php.net/array"&gt;&lt;span class="kw3"&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$Model&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;alias&lt;/span&gt; . &lt;span class="st0"&gt;'.'&lt;/span&gt; . &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;__settings&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;&lt;span class="re0"&gt;$Model&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;alias&lt;/span&gt;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;&lt;span class="st0"&gt;'slug'&lt;/span&gt;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt; . &lt;span class="st0"&gt;' LIKE'&lt;/span&gt; =&amp;gt; &lt;span class="re0"&gt;$slug&lt;/span&gt; . &lt;span class="st0"&gt;'%'&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&lt;span class="kw2"&gt;?&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;2. Change Line 125 to:&lt;/p&gt;
&lt;div class="clear"&gt;&lt;/div&gt;
&lt;div class="code debuggable_sh_php" style="white-space: wrap;white-space: nowrap;"&gt;&lt;span class="kw2"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;
&lt;span class="re0"&gt;$conditions&lt;/span&gt;&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;&lt;span class="re0"&gt;$Model&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;alias&lt;/span&gt; . &lt;span class="st0"&gt;'.'&lt;/span&gt; . &lt;span class="re0"&gt;$Model&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;primaryKey&lt;/span&gt; . &lt;span class="st0"&gt;' &amp;lt;&amp;gt;'&lt;/span&gt;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt; = &lt;span class="re0"&gt;$Model&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;id&lt;/span&gt;;&lt;br /&gt;
&lt;span class="kw2"&gt;?&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;This is simply changing the syntax for NOT and LIKE conditions.&lt;/p&gt;
&lt;h3&gt;Step 5: Download Debuggable's Sluggish Shell&lt;/h3&gt;
&lt;p&gt;Copy the following code to a 'sluggish.php' file in your vendors/shells folder. Just mouseover the code to see it in raw text.&lt;/p&gt;
&lt;div class="clear"&gt;&lt;/div&gt;
&lt;div class="code debuggable_sh_php" style="white-space: wrap;white-space: nowrap;"&gt;&lt;span class="kw2"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;
&lt;span class="coMULTI"&gt;/**&lt;br /&gt;
&amp;nbsp;* Sluggish Shell&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;* Set overwrite =&amp;gt; true before running this in your $actsAs declaration!&lt;br /&gt;
&amp;nbsp;* This shell allows you to generate unique slugs for a database table ready for use &lt;br /&gt;
&amp;nbsp;* with the sluggable behavior by Mariano Iglesias&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;* Sluggish Shell : Make your table sluggable&lt;br /&gt;
&amp;nbsp;* Copyright 2009, Debuggable, Ltd. (http://debuggable.com)&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;* Licensed under The MIT License&lt;br /&gt;
&amp;nbsp;* Redistributions of files must retain the above copyright notice.&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;* @filesource&lt;br /&gt;
&amp;nbsp;* @copyright &amp;nbsp; &amp;nbsp; Copyright 2009, Debuggable, Ltd. (http://debuggable.com)&lt;br /&gt;
&amp;nbsp;* @link &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project&lt;br /&gt;
&amp;nbsp;* @license &amp;nbsp; &amp;nbsp; &amp;nbsp; http://www.opensource.org/licenses/mit-license.php The MIT License&lt;br /&gt;
&amp;nbsp;*/&lt;/span&gt;&lt;br /&gt;
&lt;span class="kw2"&gt;class&lt;/span&gt; SluggishShell &lt;span class="kw2"&gt;extends&lt;/span&gt; Shell &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&lt;span class="coMULTI"&gt;/**&lt;br /&gt;
&amp;nbsp;* undocumented function&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;* @return void&lt;br /&gt;
&amp;nbsp;* @access public&lt;br /&gt;
&amp;nbsp;*/&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &lt;span class="kw2"&gt;function&lt;/span&gt; main&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;a href="http://www.php.net/empty"&gt;&lt;span class="kw3"&gt;empty&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;args&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="kw1"&gt;return&lt;/span&gt; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;'You need to specify a modelname'&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$model&lt;/span&gt; = &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;args&lt;/span&gt;&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;&lt;span class="nu0"&gt;0&lt;/span&gt;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$force&lt;/span&gt; = &lt;a href="http://www.php.net/isset"&gt;&lt;span class="kw3"&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;args&lt;/span&gt;&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;&lt;span class="nu0"&gt;1&lt;/span&gt;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; ? &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;args&lt;/span&gt;&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;&lt;span class="nu0"&gt;1&lt;/span&gt;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt; : &lt;span class="kw2"&gt;false&lt;/span&gt;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$Model&lt;/span&gt; = ClassRegistry::&lt;span class="me2"&gt;init&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$model&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$behavior&lt;/span&gt; = &lt;span class="st0"&gt;'Sluggable'&lt;/span&gt;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;!&lt;a href="http://www.php.net/is_object"&gt;&lt;span class="kw3"&gt;is_object&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$Model&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="kw1"&gt;return&lt;/span&gt; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;'This model does not exist.'&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;!&lt;a href="http://www.php.net/in_array"&gt;&lt;span class="kw3"&gt;in_array&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$behavior&lt;/span&gt;, &lt;span class="re0"&gt;$Model&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;actsAs&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &amp;amp;&amp;amp; !&lt;a href="http://www.php.net/array_key_exists"&gt;&lt;span class="kw3"&gt;array_key_exists&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$behavior&lt;/span&gt;, &lt;span class="re0"&gt;$Model&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;actsAs&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="kw1"&gt;return&lt;/span&gt; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;'The Sluggable Behavior is not yet linked to the model.'&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$label&lt;/span&gt; = &lt;span class="st0"&gt;'title'&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;a href="http://www.php.net/isset"&gt;&lt;span class="kw3"&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$Model&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;actsAs&lt;/span&gt;&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;&lt;span class="st0"&gt;'Sluggable'&lt;/span&gt;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;&lt;span class="st0"&gt;'label'&lt;/span&gt;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$label&lt;/span&gt; = &lt;span class="re0"&gt;$Model&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;actsAs&lt;/span&gt;&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;&lt;span class="st0"&gt;'Sluggable'&lt;/span&gt;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;&lt;span class="st0"&gt;'label'&lt;/span&gt;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$Model&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;recursive&lt;/span&gt; = &lt;span class="nu0"&gt;-1&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$conditions&lt;/span&gt; = &lt;span class="re0"&gt;$force&lt;/span&gt; ? &lt;span class="kw2"&gt;false&lt;/span&gt; : &lt;a href="http://www.php.net/array"&gt;&lt;span class="kw3"&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;'slug'&lt;/span&gt; =&amp;gt; &lt;span class="st0"&gt;''&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$rows&lt;/span&gt; = &lt;span class="re0"&gt;$Model&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;find&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;'all'&lt;/span&gt;, &lt;a href="http://www.php.net/compact"&gt;&lt;span class="kw3"&gt;compact&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;'conditions'&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$count&lt;/span&gt; = &lt;a href="http://www.php.net/count"&gt;&lt;span class="kw3"&gt;count&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$rows&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$i&lt;/span&gt; = &lt;span class="nu0"&gt;0&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="kw1"&gt;foreach&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$rows&lt;/span&gt; &lt;span class="kw1"&gt;as&lt;/span&gt; &lt;span class="re0"&gt;$row&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$Model&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;set&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;a href="http://www.php.net/array"&gt;&lt;span class="kw3"&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$Model&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;primaryKey&lt;/span&gt; =&amp;gt; &lt;span class="re0"&gt;$row&lt;/span&gt;&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;&lt;span class="re0"&gt;$model&lt;/span&gt;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;&lt;span class="re0"&gt;$Model&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;primaryKey&lt;/span&gt;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$label&lt;/span&gt; =&amp;gt; &lt;span class="re0"&gt;$row&lt;/span&gt;&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;&lt;span class="re0"&gt;$model&lt;/span&gt;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;&lt;span class="re0"&gt;$label&lt;/span&gt;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$Model&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;save&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$row&lt;/span&gt; = &lt;span class="re0"&gt;$Model&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;find&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;'first'&lt;/span&gt;, &lt;a href="http://www.php.net/array"&gt;&lt;span class="kw3"&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="st0"&gt;'conditions'&lt;/span&gt; =&amp;gt; &lt;a href="http://www.php.net/array"&gt;&lt;span class="kw3"&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$Model&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;primaryKey&lt;/span&gt; =&amp;gt; &lt;span class="re0"&gt;$row&lt;/span&gt;&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;&lt;span class="re0"&gt;$model&lt;/span&gt;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;&lt;span class="re0"&gt;$Model&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;primaryKey&lt;/span&gt;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="st0"&gt;'slug'&lt;/span&gt; =&amp;gt; &lt;span class="st0"&gt;''&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="st0"&gt;'contain'&lt;/span&gt; =&amp;gt; &lt;span class="kw2"&gt;false&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;a href="http://www.php.net/empty"&gt;&lt;span class="kw3"&gt;empty&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$row&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$i&lt;/span&gt;++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt; &lt;span class="kw1"&gt;else&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;'Problem saving the slug for '&lt;/span&gt; . &lt;span class="re0"&gt;$row&lt;/span&gt;&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;&lt;span class="re0"&gt;$model&lt;/span&gt;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;&lt;span class="re0"&gt;$label&lt;/span&gt;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$Model&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;validationErrors&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;'Added '&lt;/span&gt; . &lt;span class="re0"&gt;$i&lt;/span&gt; . &lt;span class="st0"&gt;' slugs for '&lt;/span&gt; . &lt;span class="re0"&gt;$count&lt;/span&gt; . &lt;span class="st0"&gt;' '&lt;/span&gt; . Inflector::&lt;span class="me2"&gt;pluralize&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$model&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;span class="coMULTI"&gt;/**&lt;br /&gt;
&amp;nbsp;* undocumented function&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;* @return void&lt;br /&gt;
&amp;nbsp;* @access public&lt;br /&gt;
&amp;nbsp;*/&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &lt;span class="kw2"&gt;function&lt;/span&gt; help&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;'Debuggable Ltd. Sluggish Shell - http://debuggable.com'&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;hr&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;'Important: Configure your paths in the shell&lt;span class="es0"&gt;\'&lt;/span&gt;s initialize() function.'&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;hr&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;'This shell allows you to migrate a database table to use Mariano Iglesias&lt;span class="es0"&gt;\'&lt;/span&gt; Sluggable Behavior.'&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;'Add a slug field to the table, download the sluggable behavior, add your $actsAs declaration and run this shell.'&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;''&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;hr&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;&amp;quot;Usage: cake sluggish ModelNameInCamelCase&amp;quot;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;''&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;span class="kw2"&gt;?&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;The code is very simple. The shell takes a modelname and checks if your $actsAs declaration is properly set up. If it is, it finds all rows from the table and saves them right away, with the label field in the Model::set() call.&lt;br /&gt;
Since we have specified overwrite =&gt; true in the $actsAs declaration, the sluggable behavior now overwrites all slug fields in the table, giving you nice slugs.&lt;/p&gt;
&lt;h3&gt;Step 6: Run The Sluggish Shell&lt;/h3&gt;
&lt;p&gt;Run "cake sluggish ModelNameInCamelCase" in your terminal.&lt;/p&gt;
&lt;h3&gt;Step 7: Change your urls&lt;/h3&gt;
&lt;p&gt;The Sluggable behavior creates unique slugs. If two of your blogposts for example have the same title, the first one will have 'my-blogpost-title' as its slug and the second one will have 'my-blogpost-title-1'. Mariano's behavior attaches an integer to the slug depending on how often the slug was used already.&lt;/p&gt;
&lt;p&gt;Now that you have &lt;strong&gt;unique&lt;/strong&gt; slugs, you can change your controller code and view code to take account of this. If you are heavily indexed in google already, you might want to provide 301 (permanent) redirects for the old urls, or just offer both urls to access the same blogpost, but only use slugs throughout the app.&lt;/p&gt;
&lt;p&gt;Enjoy! Post any feedback or help requests in the comments below.&lt;/p&gt;
&lt;p&gt;-- Tim Koschuetzki aka DarkAngelBGE&lt;br /&gt;
&lt;img style="display: none;" src="http://debuggable.com/posts/tick/4a2cee35-0e24-4d73-a545-3f514834cda3"&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/debuggable/~4/CwouH9nDagU" height="1" width="1"/&gt;</description><author>tim@debuggable.com</author><pubDate>Mon, 08 Jun 2009 11:30:31 +0000</pubDate><comments>http://debuggable.com/posts/migrating-a-database-table-for-use-with-the-cakephp-sluggable-behavior:4a2cee35-0e24-4d73-a545-3f514834cda3</comments><feedburner:origLink>http://debuggable.com/posts/migrating-a-database-table-for-use-with-the-cakephp-sluggable-behavior:4a2cee35-0e24-4d73-a545-3f514834cda3</feedburner:origLink><feedburner:origLink>http://feedproxy.google.com/~r/debuggable/~3/CwouH9nDagU/migrating-a-database-table-for-use-with-the-cakephp-sluggable-behavior:4a2cee35-0e24-4d73-a545-3f514834cda3</feedburner:origLink></item><item><title>CakePHP RemoveCache Shell - Remove Your Cache Files Easily</title><link>http://feedproxy.google.com/~r/thinkingphp/~3/ToyINvrFBto/cakephp-removecache-shell---remove-your-cache-files-easily:4a277938-977c-43bc-bd83-645c4834cda3</link><guid isPermaLink="false">http://debuggable.com/posts/cakephp-removecache-shell---remove-your-cache-files-easily:4a277938-977c-43bc-bd83-645c4834cda3</guid><description>&lt;p&gt;Hey folks,&lt;/p&gt;
&lt;p&gt;it's been a while since the last post here on Debuggable. However, this ends now and apart from this very post here we have something bigger brewing for you as well. So please stay tuned a little longer. :)&lt;/p&gt;
&lt;p&gt;Anyways, on to some Caching fun.&lt;/p&gt;
&lt;h2&gt;The Motivation&lt;/h2&gt;
&lt;p&gt;1. When you work with large projects you can end up with a ton of cache files (models, db cache, etc.) as well as view caching files. When you try removing them with:&lt;/p&gt;
&lt;p&gt;cd /app/tmp/cache/models &amp;&amp; rm -f cake_*&lt;/p&gt;
&lt;p&gt;and &lt;/p&gt;
&lt;p&gt;cd /app/tmp/cache/views &amp;&amp; rm -f *&lt;/p&gt;
&lt;p&gt;.. you can end up with with the "argument list too long" error easily.&lt;/p&gt;
&lt;p&gt;2. Also, executing two commands sucks - we are lazy after all. Now you could pull out some fancy bash fun to pipe file names. Have a look at this:&lt;/p&gt;
&lt;p&gt;find . -type f | awk '!/empty/ {print "rm", $0}' | bash&lt;/p&gt;
&lt;p&gt;The problem is, when you run this in /app/tmp it will not only remove cache files, but also files in /tmp/sessions, /tmp/logs and so on. If you ask me, the command is complex enough, so no need to add more funny stuff there to take this into account.&lt;/p&gt;
&lt;p&gt;(For you peeps who want to see this, I bugged Felix to tell me: find . -type f | awk '!/empty$|^.\/logs|^.\/sessions/ {print "rm", $0}' | bash)&lt;/p&gt;
&lt;p&gt;3. Once you are on windows, you do not have a powerful bash to your side.&lt;/p&gt;
&lt;p&gt;I thought a simple call to a CakePHP shell can do the trick as well and doesn't force you to waste half a minute to remember and type in the proper bash command.&lt;/p&gt;
&lt;h2&gt;The Solution&lt;/h2&gt;
&lt;p&gt;The RemoveCache shell allows you to remove your cae cache files easily. It takes two parameter:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A boolean to control if you want to remove standard cache files (models, db cache, etc.)&lt;/li&gt;
&lt;li&gt;A regex pattern to control which view cache files to remove&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here are some common usage scenarios:&lt;/p&gt;
&lt;p&gt;Usage: cake remove_cache &amp;lt;std_cache_boolean&amp;gt; &amp;lt;pattern_to_match_viewcache_files&amp;gt;&lt;br /&gt;
Usage: cake remove_cache 				// removes all cache files&lt;br /&gt;
Usage: cake remove_cache 0 				// removes only view cache files&lt;br /&gt;
Usage: cake remove_cache 0 home 		// removes only the view cache file for your homepage&lt;br /&gt;
Usage: cake remove_cache 0 articles_ 	// removes all view cache files for your articles controller&lt;br /&gt;
Usage: cake remove_cache 1 /letter_z$/ 	// removes all std cache files and view cache files ending with 'letter_z'&lt;/p&gt;
&lt;p&gt;I did not put in a pattern for standard cache files, because most of the time you cannot remember your cache keys anyways and most of the time it doesn't harm if a cache file is invalidated to rebuilt the cache. If someone wants a pattern for that too, because they have long-taking queries, just comment and I will add it.&lt;/p&gt;
&lt;p&gt;By default, the shell looks in your standard /app/tmp directory (plus subfolders) to find the cache files. If you have a shared Cake installation or any other fancy setup, please adjust the cache paths in the inititalize() method.&lt;/p&gt;
&lt;h2&gt;The Code&lt;/h2&gt;
&lt;div class="clear"&gt;&lt;/div&gt;
&lt;div class="code debuggable_sh_php" style="white-space: wrap;white-space: nowrap;"&gt;&lt;span class="kw2"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;
&lt;span class="coMULTI"&gt;/**&lt;br /&gt;
&amp;nbsp;* Remove Cache Shell&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;* This shell allows you to remove cache files easily and provides you with a couple configuration options.&lt;br /&gt;
&amp;nbsp;* If run with no command line arguments, RemoveCache removes all your standard cache files (db cache, model cache, etc.)&lt;br /&gt;
&amp;nbsp;* as well as your view caching files.&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;* RemoveCache Shell : Removing your Cache&lt;br /&gt;
&amp;nbsp;* Copyright 2009, Debuggable, Ltd. (http://debuggable.com)&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;* Licensed under The MIT License&lt;br /&gt;
&amp;nbsp;* Redistributions of files must retain the above copyright notice.&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;* @filesource&lt;br /&gt;
&amp;nbsp;* @copyright &amp;nbsp; &amp;nbsp; Copyright 2009, Debuggable, Ltd. (http://debuggable.com)&lt;br /&gt;
&amp;nbsp;* @link &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project&lt;br /&gt;
&amp;nbsp;* @license &amp;nbsp; &amp;nbsp; &amp;nbsp; http://www.opensource.org/licenses/mit-license.php The MIT License&lt;br /&gt;
&amp;nbsp;*/&lt;/span&gt;&lt;br /&gt;
&lt;span class="kw2"&gt;class&lt;/span&gt; RemoveCacheShell &lt;span class="kw2"&gt;extends&lt;/span&gt; Shell &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&lt;span class="coMULTI"&gt;/**&lt;br /&gt;
&amp;nbsp;* undocumented function&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;* @return void&lt;br /&gt;
&amp;nbsp;* @access public&lt;br /&gt;
&amp;nbsp;*/&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &lt;span class="kw2"&gt;function&lt;/span&gt; initialize&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; parent::&lt;span class="me2"&gt;initialize&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;settings&lt;/span&gt; = &lt;a href="http://www.php.net/array"&gt;&lt;span class="kw3"&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="st0"&gt;'view_cache_path'&lt;/span&gt; =&amp;gt; APP . &lt;span class="st0"&gt;'tmp'&lt;/span&gt; . DS . &lt;span class="st0"&gt;'cache'&lt;/span&gt; . DS . &lt;span class="st0"&gt;'views'&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="st0"&gt;'std_cache_paths'&lt;/span&gt; =&amp;gt; &lt;a href="http://www.php.net/array"&gt;&lt;span class="kw3"&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; APP . &lt;span class="st0"&gt;'tmp'&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; APP . &lt;span class="st0"&gt;'tmp'&lt;/span&gt; . DS . &lt;span class="st0"&gt;'cache'&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; APP . &lt;span class="st0"&gt;'tmp'&lt;/span&gt; . DS . &lt;span class="st0"&gt;'models'&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; APP . &lt;span class="st0"&gt;'tmp'&lt;/span&gt; . DS . &lt;span class="st0"&gt;'persistent'&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;span class="coMULTI"&gt;/**&lt;br /&gt;
&amp;nbsp;* undocumented function&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;* @return void&lt;br /&gt;
&amp;nbsp;* @access public&lt;br /&gt;
&amp;nbsp;*/&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &lt;span class="kw2"&gt;function&lt;/span&gt; main&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$args&lt;/span&gt; = &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;args&lt;/span&gt;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$stdCache&lt;/span&gt; = !&lt;a href="http://www.php.net/isset"&gt;&lt;span class="kw3"&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$args&lt;/span&gt;&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;&lt;span class="nu0"&gt;0&lt;/span&gt;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; || &lt;span class="re0"&gt;$args&lt;/span&gt;&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;&lt;span class="nu0"&gt;0&lt;/span&gt;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$viewCachePattern&lt;/span&gt; = &lt;a href="http://www.php.net/isset"&gt;&lt;span class="kw3"&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$args&lt;/span&gt;&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;&lt;span class="nu0"&gt;1&lt;/span&gt;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; ? &lt;span class="re0"&gt;$args&lt;/span&gt;&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;&lt;span class="nu0"&gt;1&lt;/span&gt;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt; : &lt;span class="st0"&gt;'.*'&lt;/span&gt;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$stdCache&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;_cleanStdCache&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;_cleanViewCache&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$viewCachePattern&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;span class="coMULTI"&gt;/**&lt;br /&gt;
&amp;nbsp;* Cleans the standard cache, ie all model caches, db caches, persistent caches&lt;br /&gt;
&amp;nbsp;* Files need to be prefixed with cake_ to be removed&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;* @return void&lt;br /&gt;
&amp;nbsp;* @access public&lt;br /&gt;
&amp;nbsp;*/&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &lt;span class="kw2"&gt;function&lt;/span&gt; _cleanStdCache&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$paths&lt;/span&gt; = &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;settings&lt;/span&gt;&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;&lt;span class="st0"&gt;'std_cache_paths'&lt;/span&gt;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &lt;span class="kw1"&gt;foreach&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$paths&lt;/span&gt; &lt;span class="kw1"&gt;as&lt;/span&gt; &lt;span class="re0"&gt;$path&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$folder&lt;/span&gt; = &lt;span class="kw2"&gt;new&lt;/span&gt; Folder&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$path&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$contents&lt;/span&gt; = &lt;span class="re0"&gt;$folder&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;read&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$files&lt;/span&gt; = &lt;span class="re0"&gt;$contents&lt;/span&gt;&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;&lt;span class="nu0"&gt;1&lt;/span&gt;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="kw1"&gt;foreach&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$files&lt;/span&gt; &lt;span class="kw1"&gt;as&lt;/span&gt; &lt;span class="re0"&gt;$file&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;!&lt;a href="http://www.php.net/preg_match"&gt;&lt;span class="kw3"&gt;preg_match&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;'/^cake_/'&lt;/span&gt;, &lt;span class="re0"&gt;$file&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="kw1"&gt;continue&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$path&lt;/span&gt; . DS . &lt;span class="re0"&gt;$file&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @&lt;a href="http://www.php.net/unlink"&gt;&lt;span class="kw3"&gt;unlink&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$path&lt;/span&gt; . DS . &lt;span class="re0"&gt;$file&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;span class="coMULTI"&gt;/**&lt;br /&gt;
&amp;nbsp;* Cleans all view caching files. Takes a pattern to match files against.&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;* @param string $pattern &lt;br /&gt;
&amp;nbsp;* @return void&lt;br /&gt;
&amp;nbsp;* @access public&lt;br /&gt;
&amp;nbsp;*/&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &lt;span class="kw2"&gt;function&lt;/span&gt; _cleanViewCache&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$pattern&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$path&lt;/span&gt; = &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;settings&lt;/span&gt;&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;&lt;span class="st0"&gt;'view_cache_path'&lt;/span&gt;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$pattern&lt;/span&gt;&lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;span class="nu0"&gt;0&lt;/span&gt;&lt;span class="br0"&gt;&amp;#125;&lt;/span&gt; != &lt;span class="st0"&gt;'/'&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$pattern&lt;/span&gt; = &lt;span class="st0"&gt;'/'&lt;/span&gt; . &lt;span class="re0"&gt;$pattern&lt;/span&gt; . &lt;span class="st0"&gt;'/i'&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$folder&lt;/span&gt; = &lt;span class="kw2"&gt;new&lt;/span&gt; Folder&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$path&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$contents&lt;/span&gt; = &lt;span class="re0"&gt;$folder&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;read&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$files&lt;/span&gt; = &lt;span class="re0"&gt;$contents&lt;/span&gt;&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;&lt;span class="nu0"&gt;1&lt;/span&gt;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="kw1"&gt;foreach&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$files&lt;/span&gt; &lt;span class="kw1"&gt;as&lt;/span&gt; &lt;span class="re0"&gt;$file&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;!&lt;a href="http://www.php.net/preg_match"&gt;&lt;span class="kw3"&gt;preg_match&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$pattern&lt;/span&gt;, &lt;span class="re0"&gt;$file&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="kw1"&gt;continue&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$path&lt;/span&gt; . DS . &lt;span class="re0"&gt;$file&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; @&lt;a href="http://www.php.net/unlink"&gt;&lt;span class="kw3"&gt;unlink&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="re0"&gt;$path&lt;/span&gt; . DS . &lt;span class="re0"&gt;$file&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;span class="coMULTI"&gt;/**&lt;br /&gt;
&amp;nbsp;* undocumented function&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;* @return void&lt;br /&gt;
&amp;nbsp;* @access public&lt;br /&gt;
&amp;nbsp;*/&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &lt;span class="kw2"&gt;function&lt;/span&gt; help&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;'Debuggable Ltd. Remove Cache Shell - http://debuggable.com'&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;hr&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;'Important: Configure your paths in the shell&lt;span class="es0"&gt;\'&lt;/span&gt;s initialize() function.'&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;hr&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;'This shell allows you to remove cache files easily and provides you with a couple configuration options.'&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;'If run with no command line arguments, RemoveCache removes all your standard cache files (db cache, model cache, etc.) '&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;'as well as your view caching files.'&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;''&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;'Set the first parameter to 0 (zero), to not remove standard cache files.'&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;'Set a regex pattern for the second argument, to match viewcache files to delete.'&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;hr&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;&amp;quot;Usage: cake remove_cache &amp;lt;std_cache_boolean&amp;gt; &amp;lt;pattern_to_match_viewcache_files&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;&amp;quot;Usage: cake remove_cache &lt;span class="es0"&gt;\t&lt;/span&gt;&lt;span class="es0"&gt;\t&lt;/span&gt;// removes all cache files&amp;quot;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;&amp;quot;Usage: cake remove_cache 0 &lt;span class="es0"&gt;\t&lt;/span&gt;&lt;span class="es0"&gt;\t&lt;/span&gt;// removes only view cache files&amp;quot;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;&amp;quot;Usage: cake remove_cache 0 home &lt;span class="es0"&gt;\t&lt;/span&gt;// removes only the view cache file for your homepage&amp;quot;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;&amp;quot;Usage: cake remove_cache 0 articles_ &lt;span class="es0"&gt;\t&lt;/span&gt;// removes all view cache files for your articles controller&amp;quot;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;&amp;quot;Usage: cake remove_cache 1 /letter_z$/ &lt;span class="es0"&gt;\t&lt;/span&gt;// removes all std cache files and view cache files ending with 'letter_z'&amp;quot;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="re0"&gt;$this&lt;/span&gt;-&amp;gt;&lt;span class="me1"&gt;out&lt;/span&gt;&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="st0"&gt;''&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;span class="kw2"&gt;?&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;Enjoy! Feedback welcome.&lt;/p&gt;
&lt;p&gt;-- Tim Koschuetzki aka DarkAngelBGE&lt;br /&gt;
&lt;img style="display: none;" src="http://debuggable.com/posts/tick/4a277938-977c-43bc-bd83-645c4834cda3"&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/debuggable/~4/KAlRzXJdFhk" height="1" width="1"/&gt;</description><author>tim@debuggable.com</author><pubDate>Thu, 04 Jun 2009 09:38:32 +0000</pubDate><comments>http://debuggable.com/posts/cakephp-removecache-shell---remove-your-cache-files-easily:4a277938-977c-43bc-bd83-645c4834cda3</comments><feedburner:origLink>http://debuggable.com/posts/cakephp-removecache-shell---remove-your-cache-files-easily:4a277938-977c-43bc-bd83-645c4834cda3</feedburner:origLink><feedburner:origLink>http://feedproxy.google.com/~r/debuggable/~3/KAlRzXJdFhk/cakephp-removecache-shell---remove-your-cache-files-easily:4a277938-977c-43bc-bd83-645c4834cda3</feedburner:origLink></item><item><title>The biggest CakeFest to be held in Berlin</title><link>http://feedproxy.google.com/~r/thinkingphp/~3/kvdb8Lwq1GI/the-biggest-cakefest-to-be-held-in-berlin:49ca446d-150c-4767-b220-25194834cda3</link><guid isPermaLink="false">http://debuggable.com/posts/the-biggest-cakefest-to-be-held-in-berlin:49ca446d-150c-4767-b220-25194834cda3</guid><description>&lt;p&gt;I will make this short. The 3rd and so far biggest &lt;a href="http://cakefest.org/"&gt;CakeFest&lt;/a&gt; will be held in Berlin, home of Debuggable! From July 9-12, people from all over Europe and the rest of the world will travel to Germany in order to celebrate and learn about the best PHP framework there is.&lt;/p&gt;
&lt;p&gt;If you have not attended a CakeFest so far, here are some good ideas of what to expect:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://debuggable.com/posts/cakefest-orlando-2008-summary:480f4dd6-6404-4774-a771-4e8fcbdd56cb"&gt;CakeFest #1 (Orlando)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://debuggable.com/posts/cakefest-buenos-aires-2008:493eb5ea-6db8-4688-a230-5fc84834cda3"&gt;CakeFest #2 (Buenos Aires)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Raleigh Workshop (&lt;a href="http://debuggable.com/posts/workshop-day-1-missed-blog-post:48c3cd72-b924-40e2-ac52-6d504834cda3"&gt;Day 1&lt;/a&gt;, &lt;a href="http://debuggable.com/posts/workshop-day-2:48c51df7-4fd4-4906-8b1f-6ed64834cda3"&gt;Day 2&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The event consists of two parts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;July 9-10: CakePHP Workshop - (Lead by the CakePHP core team)&lt;/li&gt;
&lt;li&gt;July 11-12: CakePHP Conference - (Presented by the core team + community)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The 2-day workshop is packed with a series of tutorials designed to give developers, both new and seasoned, a solid understanding in building reliable CakePHP applications. Veterans and experts can skip over stuff they already know and use this time for 1 on 1 sessions with the non-presenting developers. The Workshop + Conference ticket is 599 EUR (499 EUR if you do not attend the conference).&lt;/p&gt;
&lt;p&gt;The conference itself is going to be packed with talks, delivered by both the CakePHP core team as well as &lt;a href="http://cakefest.org/talks/add"&gt;interested community members&lt;/a&gt;. At just 199 EUR (student discounts to be announced soon) there is no excuse for not attending.&lt;/p&gt;
&lt;p&gt;I will &lt;a href="http://cakefest.org/talks"&gt;talk&lt;/a&gt; on JavaScript for (Cake)PHP developers as well as share my experience in project management using GitHub + Lighthouse. Tim is still making up his mind, but will probably talk about Advanced Debugging.&lt;/p&gt;
&lt;p&gt;The &lt;a href="http://cakefest.org/pages/travel"&gt;location for the conference&lt;/a&gt; is a few streets down in my neighborhood, so be assured that we will have more than enough opportunity to gather &amp; celebrate in the evenings.&lt;/p&gt;
&lt;p&gt;If you have any questions, please feel free to post them here or email them to me at &lt;a href="mailto:felix@debuggable.com"&gt;felix@debuggable.com&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Otherwise go ahead and &lt;a href="http://cakefest.org/registrations/add"&gt;sign up&lt;/a&gt;, you will not regret it as the conference will also feature some major announcements exclusively made there.&lt;/p&gt;
&lt;p&gt;- -Felix Geisendörfer aka the_undefined&lt;br /&gt;
&lt;img style="display: none;" src="http://debuggable.com/posts/tick/49ca446d-150c-4767-b220-25194834cda3"&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/debuggable/~4/KzC8pq_4dmM" height="1" width="1"/&gt;</description><author>felix@debuggable.com</author><pubDate>Wed, 25 Mar 2009 16:08:44 +0000</pubDate><comments>http://debuggable.com/posts/the-biggest-cakefest-to-be-held-in-berlin:49ca446d-150c-4767-b220-25194834cda3</comments><feedburner:origLink>http://debuggable.com/posts/the-biggest-cakefest-to-be-held-in-berlin:49ca446d-150c-4767-b220-25194834cda3</feedburner:origLink><feedburner:origLink>http://feedproxy.google.com/~r/debuggable/~3/KzC8pq_4dmM/the-biggest-cakefest-to-be-held-in-berlin:49ca446d-150c-4767-b220-25194834cda3</feedburner:origLink></item><link rel="stylesheet" type="text/css" href="/css/syntax_hilite.css" /></channel></rss>
