public
Description: Store translation strings in the database allowing you to update text without requiring a code deploy.
Clone URL: git://github.com/caring/gibberish_db.git
A bit of cleanup in language cache invalidations.

This still isn't right, but it won't matter until we start adding a
lot of languages on the fly.
dustin (author)
Thu Apr 24 13:02:24 -0700 2008
dustin (committer)
Thu Apr 24 13:06:34 -0700 2008
commit  e1e2aeb176bb5f729b0bbd994ee4945bede1593f
tree    f6ff1b9c9d261d1301f16313a4c82bf6fbc1e9b5
parent  00b551bc074e886e7c0e3bf89c53d91a4cc4a204
...
22
23
24
 
 
 
 
25
26
27
...
179
180
181
 
182
183
184
...
22
23
24
25
26
27
28
29
30
31
...
183
184
185
186
187
188
189
0
@@ -22,6 +22,10 @@ module Gibberish
0
 
0
     def invalidate_cache
0
       clear_cache "find_by_name:#{name}"
0
+ self.class.invalidate_cache
0
+ end
0
+
0
+ def self.invalidate_cache
0
       @@languages_by_name = {}
0
       @@languages_by_id = {}
0
     end
0
@@ -179,6 +183,7 @@ module Gibberish
0
 
0
     def self.reset_translations
0
       @@languages.each { |k,v| v.reset_translations }
0
+ Language.invalidate_cache
0
     end
0
 
0
     private

Comments

    No one has commented yet.