Skip to main content

guillotina cache implementation using redis + lru in-memory cache

Project description

https://travis-ci.org/guillotinaweb/guillotina_rediscache.svg?branch=master

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*"

1.0.13 (2017-12-15)

  • Improve request performance [vangheem]

  • Change the way we’re using the redis pool so it reuses connections [vangheem]

1.0.12 (2017-11-30)

  • Missing await statement for self.get_redis() [vangheem]

1.0.11 (2017-11-08)

  • Handle CancelledError [vangheem]

1.0.10 (2017-11-06)

  • upgrade for guillotina 2.0.0 [vangheem]

1.0.9 (2017-10-23)

  • Fix handling connection objects and releasing back to pool [vangheem]

1.0.8 (2017-10-23)

  • Fix use of pool [vangheem]

1.0.7 (2017-10-23)

  • Use pickle instead of json from load/dumps because it is much faster [vangheem]

1.0.6 (2017-10-19)

  • Use ujson [vangheem]

1.0.5 (2017-10-02)

  • Track all keys needing invalidation and do invalidation in an async task so the request can finish faster. [vangheem]

1.0.4 (2017-05-29)

  • Test fixes [vangheem]

1.0.3 (2017-05-26)

  • Fix delete not properly invalidating cache [vangheem]

1.0.2 (2017-05-15)

  • Fix channel publishing invalidations [vangheem]

1.0.1 (2017-05-15)

  • Fix release

1.0.0 (2017-05-15)

  • initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

guillotina_rediscache-1.0.13.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

guillotina_rediscache-1.0.13-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file guillotina_rediscache-1.0.13.tar.gz.

File metadata

File hashes

Hashes for guillotina_rediscache-1.0.13.tar.gz
Algorithm Hash digest
SHA256 cffacf53178f4adb5d8edb4dd03560d8af0be8bc7d819538d80a3660e9a36bae
MD5 9c99ebc4cab562ef88dd78f78017f60c
BLAKE2b-256 7212e8ad3c1f3e7ec8b34abb3442b1d464a752c4b17bc18fff51ba225c9f6651

See more details on using hashes here.

File details

Details for the file guillotina_rediscache-1.0.13-py3-none-any.whl.

File metadata

File hashes

Hashes for guillotina_rediscache-1.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 3eac57f694b030295cd49221d3e7c3a8a7d6fdd6830ab12c6765d53e62be7a51
MD5 24ed3c414417cb1638687dc15bc8e4fb
BLAKE2b-256 af3e471bb8091e0f69a2f5dfe328e40f5d4c7a50ea96c1abcc596f8936d838d6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page