Destroy all permalinks

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)!

6 Likes

Woohoo! That’s really selling it.

1 Like

Have you tried Permalink.destroy_all? :wink:

1 Like

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:

4 Likes