Gets the Rails flash object working with page caching.