from django.db import models

from cachetask.managers import CacheManager, GreedyCacheManager



class MyBaseModel(models.Model):
    name = models.CharField(max_length=25)
    created = models.DateTimeField(auto_now_add=True)

    class Meta:
        abstract = True


class MyModel(MyBaseModel):
    # Enables selective cached queries
    objects = CacheManager()

class MyGreedyModel(MyBaseModel):
    """
    Every query is cached
    Every cache is great
    If a cache is missed
    Sysadmin gets quite irate
    """
    objects = GreedyCacheManager()

75643b54a071f2e19e1cddbe265fbb3fc2e3f797
<mask token>


class MyModel(MyBaseModel):
    <mask token>


class MyGreedyModel(MyBaseModel):
    """
    Every query is cached
    Every cache is great
    If a cache is missed
    Sysadmin gets quite irate
    """
    objects = GreedyCacheManager()

<mask token>


class MyBaseModel(models.Model):
    <mask token>
    <mask token>


    class Meta:
        abstract = True


class MyModel(MyBaseModel):
    objects = CacheManager()


class MyGreedyModel(MyBaseModel):
    """
    Every query is cached
    Every cache is great
    If a cache is missed
    Sysadmin gets quite irate
    """
    objects = GreedyCacheManager()

<mask token>


class MyBaseModel(models.Model):
    name = models.CharField(max_length=25)
    created = models.DateTimeField(auto_now_add=True)


    class Meta:
        abstract = True


class MyModel(MyBaseModel):
    objects = CacheManager()


class MyGreedyModel(MyBaseModel):
    """
    Every query is cached
    Every cache is great
    If a cache is missed
    Sysadmin gets quite irate
    """
    objects = GreedyCacheManager()

from django.db import models
from cachetask.managers import CacheManager, GreedyCacheManager


class MyBaseModel(models.Model):
    name = models.CharField(max_length=25)
    created = models.DateTimeField(auto_now_add=True)


    class Meta:
        abstract = True


class MyModel(MyBaseModel):
    objects = CacheManager()


class MyGreedyModel(MyBaseModel):
    """
    Every query is cached
    Every cache is great
    If a cache is missed
    Sysadmin gets quite irate
    """
    objects = GreedyCacheManager()

from django.db import models

from cachetask.managers import CacheManager, GreedyCacheManager



class MyBaseModel(models.Model):
    name = models.CharField(max_length=25)
    created = models.DateTimeField(auto_now_add=True)

    class Meta:
        abstract = True


class MyModel(MyBaseModel):
    # Enables selective cached queries
    objects = CacheManager()

class MyGreedyModel(MyBaseModel):
    """
    Every query is cached
    Every cache is great
    If a cache is missed
    Sysadmin gets quite irate
    """
    objects = GreedyCacheManager()
