marshal v0.9.0 Cache
Functions for manipulating and maintaining the marshal decode caches
Summary
Functions
Add an object to the cache
Add a symbol to the cache
Retrieve an object from the cache for a type link
Retrieve a symbol from the cache for a symlink reference
Replace an object stored in the cache. Used for replacing a placeholder with a real value
Replace an symbol stored in the cache. Used for updating a symbol with ivars
Functions
Add an object to the cache.
Examples
iex> Cache.add_to_object_cache(%{1 => 2}, {%{}, %{}})
{%{}, %{0 => %{1 => 2}}}
Add a symbol to the cache.
Examples
iex> Cache.add_to_symbol_cache(:test, {%{}, %{}})
{%{0 => :test}, %{}}
Retrieve an object from the cache for a type link.
Examples
iex> Cache.fetch_object(1, {%{0 => :apple, 1 => :banana}, %{0 => ["test"], 1 => "test"}})
"test"
Retrieve a symbol from the cache for a symlink reference.
Examples
iex> Cache.fetch_symbol(1, {%{0 => :apple, 1 => :banana}, %{0 => ["test"], 1 => "test"}})
:banana
Replace an object stored in the cache. Used for replacing a placeholder with a real value.
Examples
iex> Cache.replace_object_cache(<<0xFF>>, "test", {%{}, %{0 => <<0>>, 1 => <<0xFF>>}})
{%{}, %{0 => <<0>>, 1 => "test"}}