Sha256: d949f3f0761c549efc40ae8680fde9d7a26eb5f1997868c2778912e10b9f363c
Contents?: true
Size: 577 Bytes
Versions: 8
Compression:
Stored size: 577 Bytes
Contents
# -*- encoding : utf-8 -*- require 'active_record/test_helper' class ActiveRecord::SecondLevelCacheTest < Test::Unit::TestCase def setup @user = User.create :name => 'csdn', :email => 'test@csdn.com' end def test_should_get_cache_key assert_equal "slc/user/#{@user.id}/#{User::CacheVersion}", @user.second_level_cache_key end def test_should_write_and_read_cache @user.write_second_level_cache assert_not_nil User.read_second_level_cache(@user.id) @user.expire_second_level_cache assert_nil User.read_second_level_cache(@user.id) end end
Version data entries
8 entries across 8 versions & 1 rubygems