chanded spritemap instance to use quick cache
This commit is contained in:
parent
b0bfb63bb7
commit
b395552db3
@ -7,7 +7,7 @@ GIT
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
compass (0.11.beta.4.a2200b1)
|
||||
compass (0.11.beta.4.b0bfb63)
|
||||
chunky_png (~> 1.1.0)
|
||||
sass (>= 3.1.0.alpha.249)
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
module Compass
|
||||
class Sprites < Sass::Importers::Base
|
||||
attr_accessor :name, :path
|
||||
@maps = {}
|
||||
|
||||
def self.path_and_name(uri)
|
||||
if uri =~ %r{((.+/)?(.+))/(.+?)\.png}
|
||||
@ -18,8 +17,9 @@ module Compass
|
||||
end
|
||||
|
||||
def self.load_map(uri, options)
|
||||
key = self.key(uri, options)
|
||||
@maps[key] ||= SpriteMap.new(uri, options)
|
||||
Compass.quick_cache("spritemap:#{uri}", 50) do
|
||||
SpriteMap.new(uri, options)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user