Skip to content
This repository has been archived by the owner on Mar 22, 2020. It is now read-only.

Commit

Permalink
Delete namespace for memcached (score: 184209)
Browse files Browse the repository at this point in the history
  • Loading branch information
atton committed Jul 13, 2018
1 parent f417ba2 commit f7fad97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webapp/ruby/app.rb
Expand Up @@ -301,7 +301,7 @@ def user
target_user = User.find(user['id'])

if !avatar_name.nil? && !avatar_data.nil?
memcached.set(avatar_name, avatar_data, (30*24*30*30))
memcached.set('/icons/' + avatar_name, avatar_data, (30*24*30*30), raw: true)
target_user.avatar_icon = avatar_name
end

Expand All @@ -318,7 +318,7 @@ def user

def memcached
return @memcached if defined?(@memcached)
@memcached = Dalli::Client.new(ENV['ISUBATA_DB_HOST'], namespace: 'isubata')
@memcached = Dalli::Client.new(ENV['ISUBATA_DB_HOST'])
end

def db_get_user(user_id)
Expand Down

0 comments on commit f7fad97

Please sign in to comment.