diff --git a/Project.toml b/Project.toml index b415ac69..7d871e50 100644 --- a/Project.toml +++ b/Project.toml @@ -3,7 +3,7 @@ uuid = "6f1fad26-d15e-5dc8-ae53-837a1d7b8c9f" license = "MIT" desc = "Tape based task copying in Turing" repo = "https://github.com/TuringLang/Libtask.jl.git" -version = "0.8.3" +version = "0.8.4" [deps] FunctionWrappers = "069b7b12-0de2-55c6-9aab-29f3d0a68a2e" diff --git a/src/tapedfunction.jl b/src/tapedfunction.jl index 8f2e27b2..963fea47 100644 --- a/src/tapedfunction.jl +++ b/src/tapedfunction.jl @@ -62,7 +62,7 @@ mutable struct TapedFunction{F, TapeType} function TapedFunction{F, T}(f::F, args...; cache=false, deepcopy_types=Union{}) where {F, T} args_type = _accurate_typeof.(args) - cache_key = (f, args_type...) + cache_key = (f, deepcopy_types, args_type...) if cache && haskey(TRCache, cache_key) # use cache cached_tf = TRCache[cache_key]::TapedFunction{F, T}