mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-08-01 16:04:19 +00:00
20 lines
357 B
Ruby
20 lines
357 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Gitlab
|
|
module Testing
|
|
class ClearProcessMemoryCacheMiddleware
|
|
def initialize(app)
|
|
@app = app
|
|
end
|
|
|
|
def call(env)
|
|
Gitlab::ProcessMemoryCache.cache_backend.clear
|
|
|
|
@app.call(env)
|
|
ensure
|
|
Gitlab::ProcessMemoryCache.cache_backend.clear
|
|
end
|
|
end
|
|
end
|
|
end
|