#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.db import models


class ModelCaching(models.Model):
    pass

#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.db import models
from django.core.cache import cache

from .managers import CacheManager


ModelBase = type(models.Model)


class MetaCaching(ModelBase):
    def __new__(*args, **kwargs):
        new_class = ModelBase.__new__(*args, **kwargs)
        new_manager = CacheManager()
        new_manager.contribute_to_class(new_class, 'objects')
        new_class._default_manager = new_manager
        return new_class


Create MetaCaching, ModelBase for core cache
Create MetaCaching, ModelBase for core cache
