mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-18 03:25:31 -05:00
0e8914cee6
add oobgc rudimentary support
12 lines
358 B
Ruby
12 lines
358 B
Ruby
require_dependency "middleware/anonymous_cache"
|
|
|
|
enabled = if Rails.configuration.respond_to?(:enable_anon_caching)
|
|
Rails.configuration.enable_anon_caching
|
|
else
|
|
Rails.env.production?
|
|
end
|
|
|
|
if !ENV['DISCOURSE_DISABLE_ANON_CACHE'] && enabled
|
|
Rails.configuration.middleware.insert 0, Middleware::AnonymousCache
|
|
end
|
|
|