diff --git a/djangoldp/serializers.py b/djangoldp/serializers.py index 90dba77653cd866d065583ab37d86c8f7358e0b5..6fc13ee35bced56e0ad4bd1533a72e2d31e1d782 100644 --- a/djangoldp/serializers.py +++ b/djangoldp/serializers.py @@ -58,7 +58,7 @@ class LDListMixin: '''A Mixin for serializing containers into JSONLD format''' child_attr = 'child' - with_cache = settings.SERIALIZER_CACHE + with_cache = getattr(settings, 'SERIALIZER_CACHE', True) to_representation_cache = InMemoryCache() @@ -304,7 +304,7 @@ class LDPSerializer(HyperlinkedModelSerializer): serializer_url_field = JsonLdIdentityField ModelSerializer.serializer_field_mapping[LDPUrlField] = IdURLField - with_cache = settings.SERIALIZER_CACHE + with_cache = getattr(settings, 'SERIALIZER_CACHE', True) to_representation_cache = InMemoryCache()