jordic / guillotina_rediscache

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduction

image

guillotina_rediscache implements redis into guillotina with an additional in-memory layer cache.

In order to coordinate invalidating the in-memory cache, guillotina_rediscache utilizes the pub/sub feature redis provides.

Configuration

app_settings for this:

{
  "databases": {
    "db": {
      ...
      "cache_strategy": "redis"
      ...
    }
  },
  "redis": {
      'host': 'localhost',
      'port': 6379,
      'ttl': 3600,
      'memory_cache_size': 1000,
      'pool': {
          'minsize': 5,
          'maxsize': 100
      }
  }
}

Run measures

Using guillotina run command:

./bin/g run --script=measures/serialize.py -c measures/config.yaml

With profiling:

./bin/g run --script=measures/serialize.py -c measures/config.yaml --line-profiler --line-profiler-matcher="*serialize*"

About

License:Other


Languages

Language:Python 97.5%Language:Makefile 2.5%