This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2017 Maksym Melnychok | |
# MIT License - https://opensource.org/licenses/MIT | |
# | |
# inspired by https://github.com/ptrofimov/tinyredisclient | |
require 'socket' | |
class TinyRedis | |
RN = "\r\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule RequestCache do | |
@moduledoc """ | |
Simple ETS-based cache. | |
""" | |
use GenServer | |
@type t :: %{ttl: integer, invalidators: %{}} | |
@type cache_key :: any | |
@type cache_value :: any |