Islands Board Cache v0.1.8 Islands.Board.Cache View Source
Board Cache for the Game of Islands. Returns a random board.
Inspired by the course Multi-Player Bingo by Mike and Nicole Clark.
Link to this section Summary
Functions
Returns the number of boards in the cache.
Returns a random board.
Persists the given board to the configured external source.
Refreshes the cache from the configured external source and resets the timer.
Link to this section Functions
Returns the number of boards in the cache.
Returns a random board.
Examples
iex> alias Islands.Board.Cache
iex> alias Islands.Board
iex> %Board{islands: islands, misses: misses} = Cache.get_board()
iex> {map_size(islands), MapSet.size(misses)}
{5, 0}
Persists the given board to the configured external source.
Refreshes the cache from the configured external source and resets the timer.