Destroy all permalinks


(Jay Pfaffman) #1

If you think that only search engines have links to your old URLs, the search engine databases have been updated, and you want to save as much as 20ms on every 404, you can do this:

cd /var/disourse/
./launcher enter app
rails c
Permalink.destroy_all
exit
exit

Thanks to @zogstrip for pointing out the obvious (once you know it)!


(Eli the Bearded) #2

Woohoo! That’s really selling it.


(Régis Hanol) #3

Have you tried Permalink.destroy_all? :wink:


(Jay Pfaffman) #4

No! (obviously). I tried permutations of Permalink.destroy and Permalink.something.destroy.

Public humiliation is a good way to remember things, though, so I think I’ve got this one down now. :slight_smile: