class Sprockets::Index

def build_asset(path, pathname, options)

Cache asset building in memory and in persisted cache.
def build_asset(path, pathname, options)
  # Memory cache
  memoize(@assets, pathname.to_s) do
    # Persisted cache
    cache_asset(pathname.to_s) do
      super
    end
  end
end