diff options
author | Eric Wong <e@80x24.org> | 2022-01-11 18:21:04 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2022-01-21 20:29:57 +0000 |
commit | bf9787ac517fe19af5fd6ba918a66b220fcbc923 (patch) | |
tree | e30cf4a74c599bb8037f41340fc1ed8800d8af4c /lib/dtas/mcache.rb | |
parent | 88a8d4793473259b392241f1e2d20d39bd96b214 (diff) | |
download | dtas-bf9787ac517fe19af5fd6ba918a66b220fcbc923.tar.gz |
This ought to save some memory for dtas-player and dtas-readahead users with multiple instances of the same track(s) on their track list.
Diffstat (limited to 'lib/dtas/mcache.rb')
-rw-r--r-- | lib/dtas/mcache.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/dtas/mcache.rb b/lib/dtas/mcache.rb index 817bfb8..4f1e9e8 100644 --- a/lib/dtas/mcache.rb +++ b/lib/dtas/mcache.rb @@ -1,4 +1,4 @@ -# Copyright (C) 2016-2020 all contributors <dtas-all@nongnu.org> +# Copyright (C) all contributors <dtas-all@nongnu.org> # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt> # frozen_string_literal: true # encoding: binary @@ -22,7 +22,7 @@ class DTAS::Mcache @tbl[bucket] = begin cur = cur ? cur.clear : {} if ret = yield(infile, cur) - ret[:infile] = infile.frozen? ? infile : infile.dup.freeze + ret[:infile] = infile.frozen? ? infile : -(infile.dup) ret[:btime] = DTAS.now end ret |