manage_cache 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/lib/manage_cache/version.rb +1 -1
  3. data/lib/manage_cache.rb +3 -3
  4. data/test/dummy/db/development.sqlite3 +0 -0
  5. data/test/dummy/log/development.log +614 -0
  6. data/test/dummy/log/test.log +2247 -0
  7. data/test/dummy/test/controllers/users_controller_test.rb +11 -5
  8. data/test/dummy/tmp/cache/2CC/2D0/views%2F +2 -0
  9. data/test/dummy/tmp/cache/527/491/views%2Fspec-row_name%2Fuser-1%2Fupdated_at-2016-01-14+10%3A20%3A57+UTC +2 -0
  10. data/test/dummy/tmp/cache/528/731/views%2Fspec-row_name%2Fuser-2%2Fupdated_at-2016-01-14+10%3A20%3A57+UTC +2 -0
  11. data/test/dummy/tmp/cache/529/781/views%2Fspec-row_name%2Fuser-2%2Fupdated_at-2016-01-14+10%3A20%3A58+UTC +2 -0
  12. data/test/dummy/tmp/cache/52D/8B1/views%2Fspec-row_name%2Fuser-1%2Fupdated_at-2016-01-14+10%3A19%3A28+UTC +2 -0
  13. data/test/dummy/tmp/cache/96B/891/views%2Fspec-users_shoes%2Fuser-1%2Flast_updated_shoe-2016-01-14+10%3A15%3A40+UTC +2 -0
  14. data/test/dummy/tmp/cache/96F/8B1/views%2Fspec-users_shoes%2Fuser-1%2Flast_updated_shoe-2016-01-14+10%3A20%3A57+UTC +2 -0
  15. data/test/dummy/tmp/cache/970/901/views%2Fspec-users_shoes%2Fuser-1%2Flast_updated_shoe-2016-01-14+10%3A20%3A58+UTC +2 -0
  16. data/test/dummy/tmp/cache/sprockets/v3.0/09_lxM-eb2oUZWnlGLaq4F_i5h92ZObg36ae6gKq1i4.cache +1 -0
  17. data/test/dummy/tmp/cache/sprockets/v3.0/2sW6NMnj6fqDuDeMj9N8u0O_kfcyACbGT_bxWVLBSZ0.cache +1 -0
  18. data/test/dummy/tmp/cache/sprockets/v3.0/5Lly_CA8DZvPhQV2jDQx-Y6P_y3Ygra9t5jfSlGhHDA.cache +2 -0
  19. data/test/dummy/tmp/cache/sprockets/v3.0/8Lqz2M_JZndvJcmnZET75uPOyo75Jv4B3i0ZQImFJlM.cache +0 -0
  20. data/test/dummy/tmp/cache/sprockets/v3.0/9MxgZ11k1FnO5lx1r1HHNz5GnkAF3P5DOpS8p2oMyZQ.cache +1 -0
  21. data/test/dummy/tmp/cache/sprockets/v3.0/9d-nHTd-aCK04uRrii3hSfpYzj5iP2Ob1d-_qWKjCek.cache +1 -0
  22. data/test/dummy/tmp/cache/sprockets/v3.0/CRKJnPJGBJ_Dy0-QfKhF5WPh6Gj5skuy0TXmBjMTSnQ.cache +2 -0
  23. data/test/dummy/tmp/cache/sprockets/v3.0/DSOLSc6A5RVSmvM415eEWAWG_AgOvZcLZOXQjsXyWQA.cache +2 -0
  24. data/test/dummy/tmp/cache/sprockets/v3.0/Dl-NUisCUKKISrWE7M2oFXVpPFicurw2Va50_nNMy3k.cache +0 -0
  25. data/test/dummy/tmp/cache/sprockets/v3.0/DmmfrCpXtt74Hr6NO54lxyOCDv6klnDyBqeDFR7oDU8.cache +2 -0
  26. data/test/dummy/tmp/cache/sprockets/v3.0/GYYAJ3FkbQM0cLSTLqUzVyuWYL1B1AWg4FCEmXXUG9U.cache +0 -0
  27. data/test/dummy/tmp/cache/sprockets/v3.0/GkLvvxrkyX0_w9FNcSslwfEV_JzAAtRlVKM3dZAxI18.cache +0 -0
  28. data/test/dummy/tmp/cache/sprockets/v3.0/IcrjOgrUk68EJPgCdByEHzKfEKryUjeyKSWq-PEGf2E.cache +0 -0
  29. data/test/dummy/tmp/cache/sprockets/v3.0/K1DTLxe-bgF1wVbSJm2QUY_CMGj5J3FUTtHsoxl1EQc.cache +1 -0
  30. data/test/dummy/tmp/cache/sprockets/v3.0/K4HSx9qgV9xEpmTXd6xgKL4fYHWKC4MU_RY6n7TFk9Q.cache +1 -0
  31. data/test/dummy/tmp/cache/sprockets/v3.0/NwJZbK1pDbU-pMc7IsK2Rx1MwN4EaXyDMUKuzQCHPCw.cache +1 -0
  32. data/test/dummy/tmp/cache/sprockets/v3.0/OI6uxGcnsKavdWTtwDAasU3wPx8QXhzBgV0X2n1KjMQ.cache +2 -0
  33. data/test/dummy/tmp/cache/sprockets/v3.0/SXVHiwpmgcQmM4FyGzKKwKiM3jCMr8EGhSJpQiC9wcQ.cache +1 -0
  34. data/test/dummy/tmp/cache/sprockets/v3.0/UBbOS5C2oSAcdKvW_Z-oEtU6_8rnuMx9M2G3o_5QN6s.cache +1 -0
  35. data/test/dummy/tmp/cache/sprockets/v3.0/Uviw7jE916HhqccasMRdQ5CTXoBqH7dxweEg_bsm3K0.cache +1 -0
  36. data/test/dummy/tmp/cache/sprockets/v3.0/VPOhaapUo-sv4VGkt6by3qUT2B4T2kSjaHb89uicvYU.cache +0 -0
  37. data/test/dummy/tmp/cache/sprockets/v3.0/a9sNeDvMqAwAX-rnnfZrdNjSIz_Ak1KVT1kNS8SeGas.cache +1 -0
  38. data/test/dummy/tmp/cache/sprockets/v3.0/eZXj2eM6sa6zSFHhekBC5TX_Pddob3sO7hyhYVAb0fg.cache +2 -0
  39. data/test/dummy/tmp/cache/sprockets/v3.0/evilMWS_uDxgvUtMe_HRyK3ZfZo7bBegojhsvLdjcKw.cache +0 -0
  40. data/test/dummy/tmp/cache/sprockets/v3.0/eyQ1Iet2dzYcWDsu5qBemC0D5l3jdLLgchA4fkh5nnc.cache +0 -0
  41. data/test/dummy/tmp/cache/sprockets/v3.0/g5ekayFy2lyNSg0qaf9pHIi9AUYJ8eKcPfhsV0yqkPU.cache +1 -0
  42. data/test/dummy/tmp/cache/sprockets/v3.0/gZp3uXMHuYQC4hzCr7bQfetKNdJAtbQmg3so2KpW1Dw.cache +2 -0
  43. data/test/dummy/tmp/cache/sprockets/v3.0/hZi1k6tpxxCGYxRe7zY74ItcOI8gZrREOpGuA8JSpGg.cache +2 -0
  44. data/test/dummy/tmp/cache/sprockets/v3.0/iDTnVSbZnIij5Xm4jkwCyIXAPDn8RwaRe5Ja8YPKibw.cache +2 -0
  45. data/test/dummy/tmp/cache/sprockets/v3.0/iHYDh87b9nTCgd6e7YCtB9CqNPhoxyyqir0EhBx1-Rk.cache +1 -0
  46. data/test/dummy/tmp/cache/sprockets/v3.0/kyugOtp1okMz23E1fAOMqsyMHj1vAxVX-UWy0S4ZEAg.cache +2 -0
  47. data/test/dummy/tmp/cache/sprockets/v3.0/mXy3FNW22ItExIRbbqYnT6XBDj9QYoqBC8ZzyFWncGs.cache +2 -0
  48. data/test/dummy/tmp/cache/sprockets/v3.0/oiA-NPgVz4-xBX3Ri3o3lAS3l-EKuTmQ7OdbfrVdtAc.cache +2 -0
  49. data/test/dummy/tmp/cache/sprockets/v3.0/ovnZOq_jVOpE2KrlsIEIX-KoxHk-acnpn9KcSJbfkfw.cache +0 -0
  50. data/test/dummy/tmp/cache/sprockets/v3.0/pEhaat2KBd5SrT7szC_8R1_6hK17FTpvoRFkmCRSD3M.cache +2 -0
  51. data/test/dummy/tmp/cache/sprockets/v3.0/r-A0ga7LeDzW9Vsra2ECnPQdYszihD4iU_kddis_m9c.cache +2 -0
  52. data/test/dummy/tmp/cache/sprockets/v3.0/rtcJ_islohXm8x0bqaTIpW2nOttNweCIQw0qzQkEabo.cache +1 -0
  53. data/test/dummy/tmp/cache/sprockets/v3.0/tI6TANdxXMulmZuDkMCGk02plL26Vj9VGCuNvCZ8SyY.cache +1 -0
  54. data/test/dummy/tmp/cache/sprockets/v3.0/tbLteZ12v3ZDVzL-ACWn314an41wFJYQx3GCldsqR-w.cache +1 -0
  55. data/test/dummy/tmp/cache/sprockets/v3.0/vftuHuDXEagG2jsCk15VnJkFiSbkIBPZ59tyv5e0XRo.cache +0 -0
  56. data/test/dummy/tmp/cache/sprockets/v3.0/ydw-EtO01i7QnaD3kHyY0f5ol82z0etd9JYXcNRT0SA.cache +2 -0
  57. data/test/dummy/tmp/cache/sprockets/v3.0/zehql4552SVo4rZUU8Bpz_cxFIk74U7tZNmhhxX89ew.cache +0 -0
  58. data/test/dummy/tmp/pids/server.pid +1 -0
  59. metadata +106 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 26651ad9aa96d426716138f5faa2241a547d8a14
4
- data.tar.gz: 95bf2e3d8dbd0e54ea455747354bb48a5378afca
3
+ metadata.gz: 819d700cc781a2c0e4830517fb864a1f432955af
4
+ data.tar.gz: 10cf168188688ea5110bf9671df2a04a308a3152
5
5
  SHA512:
6
- metadata.gz: e0ed7a915354c2abe974b8f408b4649df7ee5c3fa84da5a86e5d3b6a0e1634c706c4fdb2c19d87bddecfb742b753b3df6ab68e7df7cc4889fb1803ca7bee5569
7
- data.tar.gz: e33cb686f516877c8cb3e0845cc27d1835bcc08f5b49aca177166ab960b1d8135f5d1f71a48e7816238552ff6d22b0ca2d8d69597de86be06fc769b8bbae1487
6
+ metadata.gz: c9dcd7ccf4633560a01d60aca9f9b169ce66bbdfc136c4d938154fe72f108ca42ab68f9abb3a44a9629148cb5d5482712fd08fdc172be86f5c23019e1bbbb5c2
7
+ data.tar.gz: 9c4b34ab3882057a483d1353d0a9ba83ae1f73f0af168b158c1ed108f648577131d75246846f36f755731460943a4b8882a2d50f33d45f380b2fe48ed53c4fb4
@@ -1,3 +1,3 @@
1
1
  module ManageCache
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/manage_cache.rb CHANGED
@@ -13,7 +13,7 @@ module ManageCache
13
13
  cattr_accessor :cache_keys_specs
14
14
  self.cache_keys_specs = keys_specs
15
15
 
16
- after_save { |record| record.dump_cache! }
16
+ before_save { |record| record.dump_cache! }
17
17
  before_destroy { |record| record.dump_cache! }
18
18
 
19
19
  include ManageCache::LocalInstanceMethods
@@ -23,8 +23,6 @@ module ManageCache
23
23
  module LocalInstanceMethods
24
24
  def dump_cache!
25
25
  self.class.cache_keys_specs.each do |k,v|
26
- instance_variable_set("@cache_key_for_#{k}", nil)
27
-
28
26
  # the rails helper method 'cache (name, opts) do ...'
29
27
  # adds some extras to the cache key.
30
28
  # To run with this gem, you have to add 'skip_digest: true'.
@@ -33,6 +31,8 @@ module ManageCache
33
31
  [cache_key_for(k), "views/#{cache_key_for(k)}"].each do |key|
34
32
  Rails.cache.delete(key)
35
33
  end
34
+
35
+ instance_variable_set("@cache_key_for_#{k}", nil)
36
36
  end
37
37
  end
38
38
 
Binary file