Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(3)  |  Derive(0)  |  Import(4)

src/d/j/django-cacheback-HEAD/sandbox/dummyapp/views.py   django-cacheback(Download)
from django.shortcuts import render
 
from cacheback.queryset import QuerySetFilterJob
from cacheback.function import FunctionJob
from cacheback.decorators import cacheback
            items = jobs.KeyedJob().get(name=request.GET['name'])
    elif 'function' in request.GET:
        job = FunctionJob()
        job.fetch_on_miss = False
        if 'q' in request.GET:

src/d/j/django-cacheback-HEAD/cacheback/decorators.py   django-cacheback(Download)
from functools import wraps
 
from django.utils.decorators import available_attrs
 
from cacheback.function import FunctionJob

src/d/j/django-cacheback-0.7/cacheback/decorators.py   django-cacheback(Download)
from functools import wraps
 
from django.utils.decorators import available_attrs
 
from cacheback.function import FunctionJob

src/d/j/django-cacheback-HEAD/tests/decorator_tests.py   django-cacheback(Download)
from django.test import TestCase
 
from cacheback.function import FunctionJob
 
 
    def setUp(self):
        self.job = FunctionJob(fetch_on_miss=False)
 
    def test_wrapping_argless_function(self):
        self.assertIsNone(self.job.get(fetch))
    def test_passing_lifetime(self):
        job = FunctionJob(300)
        self.assertEqual(300, job.lifetime)