1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Revert "Added memcached and set up cached items for up_matches page"

This reverts commit 983cc9c667.
This commit is contained in:
2015-12-17 19:20:18 +00:00
parent 983cc9c667
commit 54ecbe9451
7 changed files with 7 additions and 34 deletions

View File

@@ -9,14 +9,7 @@ class Tournament < ActiveRecord::Base
has_many :wrestlers, through: :weights
has_many :matches, dependent: :destroy
def cached_matches
cache_timestamp = self.updated_at
cache_key = "tournamentMatches|#{id}|#{cache_timestamp}"
Rails.cache.fetch(cache_key, expires_in: 10.minutes) do
self.matches.includes(:wrestlers)
end
end
def tournament_types
["Pool to bracket"]