Very late response here, and not quite an answer. In your case you want to cache all these things, in mine I want them to behave as functions, basically.
However it's in the same area so I thought might be useful for the discussion.
I use stash in a functional way all through he site I am developing. I guess coming from a programming background I just can't stand repeated code...so where I see it, I try and make a function.
Here's an example:
I 'call' it like this:
{stash:url_path}{stash:embed:utility:url_builder stash:channel_short_name="{channel_short_name}" stash:entry_id="{entry_id}" stash:urlt="{url_title}" random}{/stash:url_path}
and the 'function' itself is:
{!-- URL BUILDER --}
{!-- Takes: entry_id, channel_short_name, urlt (=url_title) --}
{!-- Takes: inks and paper_sub_cats - lists of categories --}
{!-- Returns: the URL stub for the entry e.g. /inkjet/print-packaging/cystral-clear-bags --}
{!-- Returns: 'ERROR' if it can't work it out--}
{!-- set a list of the inkjet categories--}
{snippet:global-global_set_inkjet_categories}
{!-- get (one of..) the deepest category for matching in url_builder--}
{exp:gwcode_categories entry_id="{stash:entry_id}" last_only="yes" limit="1" parse="inward" style="linear"}
{exp:stash:set name="deepest_cat_url_title" debug="yes" random}{cat_url_title}{/exp:stash:set}
{/exp:gwcode_categories}
{exp:switchee variable="stash:channel_short_name" parse="inward" debug="yes"}
{case value="product_inkjet_paper"}/inkjet/paper/{stash:urlt}{/case}
{case value="product_printer"}/inkjet/printer/{stash:urlt}{/case}
{case value="product_monitor"}/monitors/{stash:urlt}{/case}
{case value="product"}
{!-- the tricky one - these products can be found at a number of different URLs --}
{!-- so we need to use categories... --}
{switchee variable="stash:deepest_cat_url_title" parse="inward"}
{case value="{stash:paper_sub_cats}"}/inkjet/paper/{stash:urlt}{/case}
{case value="sample-packs"}/inkjet/sample-packs/{stash:urlt}{/case}
{case value="print-finishing"}/inkjet/print-finishing/{stash:urlt}{/case}
{case value="print-packaging"}/inkjet/print-packaging/{stash:urlt}{/case}
{case value="albums-and-cards"}/inkjet/paper/{stash:urlt}{/case}
{case value="{stash:inks}"}/inkjet/ink/{exp:stash:get name="deepest_cat_url_title" random}{/case}
{case default="yes"}URL_BUILDER_ERROR{/case}
{/switchee}
{/case}
{/exp:switchee}
...this works a treat to give me the full url to an entry. It does have one issue though - I get whitespace in the returned url. The url is perfectly functional, but I haven't worked out a way to trim the whitespace yet as stash embed don't have a trim parameter (have been meaning to ask about Mark Croxton about this).
I have several of these utilities that are key pieces of code. There is most likely a performance hit but it seems well worth if for the much better maintainability of isolating this logic to one place.