In the following code, I assume there's a cache_key_for
method defined in ApplicationHelper that's being used by the Rails app to compute the key used for caching the asset
objects. If that isn't the case in your app, you won't need the helper calls, but you'll need to supply whatever code you're actually using for determining cache key values.
controller = ApplicationController.new
controller.expire_fragment(helper.cache_key_for(asset))
include ApplicationHelper
controller = ApplicationController.new
controller.expire_fragment(cache_key_for(asset))