Giter Club home page Giter Club logo

django-lrucache-backend's People

Contributors

harrybiddle avatar jarshwah avatar sobil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-lrucache-backend's Issues

Integrate NO_VALIDATE and NO_PICKLE Features Back into Django Core?

I noticed your cache improves performance over Django locmem cache in two ways:

  1. It does not validate cache keys.
  2. It does not pickle cache values.

I think those features should remain the default in Django core but they may be nice options to add. Are you interested in integrating those as options into Django?

RWLock is being deprecated and isn't the correct lock to use either

Since every read is actually a write (a read shifts the element to the back of the queue), then a read write lock is not sufficient. Further, RWLock is being deprecated from django core.

Remove reliance on RWLock and switch to threading.RLock.

See also #3 which will require a new set of benchmarks doing threaded benchmarking so that locks are engaged during testing.

Change Benchmark to Use Multiple Threads

FYI, the benchmark code is using multiple processes which doesn't stress the cache like multiple threads would. If you change mp.Process to threading.Thread then everything will run the same but you'll really stress the locks.

Typo in README.MD

The 'Usage' paragraph of the readme contains a typo:

CACHES = {
    'local': {
        'BACKEND': 'lrucache_backend.LRUObjectCache',
        'TIMEOUT': 600,
        'OPTIONS': {
            'MAX_ENTRIES': 100,
            'CULL_FREQUENCY: 100,
        },
        'NAME': 'optional-name'
    }
}

'CULL_FREQUENCY: 100, is missing an apostrophe:

CACHES = {
    'local': {
        'BACKEND': 'lrucache_backend.LRUObjectCache',
        'TIMEOUT': 600,
        'OPTIONS': {
            'MAX_ENTRIES': 100,
            'CULL_FREQUENCY': 100,
        },
        'NAME': 'optional-name'
    }
}

When installing via poetry, can't use with Django 2.x

It looks like the pyproject.toml lists the Django dependency as Django = "^1.11", which means I can't use poetry to add django-lrucache-backend to a Django 2.x project.

The project read-me seems to indicate that Django 2.2 would be fine, but the pyproject.toml needs to be updated.

Here is my output when I try to add it to a Django 2.2 project:

[SolverProblemError]
Because django-lrucache-backend (2.0.0) depends on Django (>=1.11,<2.0)
 and no versions of django-lrucache-backend match >2.0.0,<3.0.0, django-lrucache-backend (>=2.0.0,<3.0.0) requires Django (>=1.11,<2.0).
So, because my_project depends on both django (^2.2.7) and django-lrucache-backend (^2.0.0), version solving failed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.