fixed clear cache rake task + puts
This commit is contained in:
parent
db4150de8d
commit
fd8476fe9c
1 changed files with 3 additions and 1 deletions
|
|
@ -3,12 +3,14 @@ namespace :cache do
|
|||
desc "Clear all caches"
|
||||
task :clear => :environment do
|
||||
if RedisCache.configured?
|
||||
redis = Redis.redis_connection
|
||||
redis = RedisCache.redis_connection
|
||||
puts "Clearing Cache..."
|
||||
redis.keys do |k|
|
||||
if k.match(/^#{RedisCache.cache_prefix}/).present?
|
||||
redis.del(k)
|
||||
end
|
||||
end
|
||||
puts "Done!"
|
||||
else
|
||||
puts "Redis Cache is not configured"
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue