mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 02:41:13 +08:00
speed up startup (avoid loading some gems on startup)
correct group permission leaks add Discourse.cache for richer caching support
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
require 'cache'
|
||||
|
||||
module Discourse
|
||||
|
||||
# When they try to do something they should be logged in for
|
||||
@ -12,6 +14,9 @@ module Discourse
|
||||
# When something they want is not found
|
||||
class NotFound < Exception; end
|
||||
|
||||
def self.cache
|
||||
@cache ||= Cache.new
|
||||
end
|
||||
|
||||
# Get the current base URL for the current site
|
||||
def self.current_hostname
|
||||
@ -20,7 +25,7 @@ module Discourse
|
||||
|
||||
def self.base_uri default_value=""
|
||||
if !ActionController::Base.config.relative_url_root.blank?
|
||||
return ActionController::Base.config.relative_url_root
|
||||
return ActionController::Base.config.relative_url_root
|
||||
else
|
||||
return default_value
|
||||
end
|
||||
|
Reference in New Issue
Block a user