diff --git a/lime/Assets.hx b/lime/Assets.hx index 36b3c8f2d..7a4139cbf 100644 --- a/lime/Assets.hx +++ b/lime/Assets.hx @@ -1060,11 +1060,14 @@ class AssetCache { audio = new Map (); font = new Map (); image = new Map (); - version = Std.int (Math.random () * 1000000); + version = AssetCache.cacheVersion (); } + private macro static function cacheVersion () {} + + public function clear (prefix:String = null):Void { if (prefix == null) { @@ -1504,6 +1507,20 @@ class Assets { } +class AssetCache { + + + private static macro function cacheVersion () { + + var version = Std.int (Math.random () * 1000000); + return Context.makeExpr (version, Context.currentPos ()); + + } + + +} + + #end #end @@ -1518,4 +1535,4 @@ class Assets { var TEMPLATE = "TEMPLATE"; var TEXT = "TEXT"; -} +} \ No newline at end of file