Action caching will vault over every built-in security measure Rails has to prevent script injection.
That is probably game over for most Rails applications, and all you need is one blind cache write to make it happen, since Rails will almost certainly give you everything you need to know in the URL to the probably-cached page (controller name, action name, object ID).
Happily, this is pretty easy to defend against: follow the directions that come with your memcached config file, particularly the one which says:
# Specify which IP address to listen on... This parameter is one of the only security measures that memcached has, so make sure it's listening on a firewalled interface. -l 127.0.0.1 *
Nonstandard ports never hurt anybody, either.