CssParser.Cache (CssParser v0.1.1) View Source

Caching for parsed css

Link to this section Summary

Functions

Get previously parsed data using a hash of the css string

Create an MD5 hash for indexing parsed data

Insert the parsed css into ets cache using hash key of the css string

Link to this section Functions

Specs

get(binary()) :: {:ok, [map()]} | {:error, []}

Get previously parsed data using a hash of the css string

Specs

hash(String.t()) :: binary()

Create an MD5 hash for indexing parsed data

Link to this function

save(parsed_data, key, list)

View Source

Specs

save([map()], binary(), [{:returning, true | false}]) :: boolean() | [map()]

Insert the parsed css into ets cache using hash key of the css string

Options

returning - when set to true it returns the inserted data, otherwise returns true