chanded spritemap instance to use quick cache

This commit is contained in:
Scott Davis 2011-03-26 15:24:59 -04:00
parent b0bfb63bb7
commit b395552db3
2 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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