Lou 3 gadus atpakaļ
vecāks
revīzija
203c9c6696

+ 2
- 0
app/serializers/activity_serializer.rb Parādīt failu

@@ -1,4 +1,6 @@
1 1
 class ActivitySerializer
2 2
   include JSONAPI::Serializer
3 3
   attributes :name, :author_id, :description, :client
4
+
5
+  cache_options store: Rails.cache, namespace: 'jsonapi-serializer', expires_in: 1.hour
4 6
 end

+ 2
- 0
app/serializers/user_serializer.rb Parādīt failu

@@ -2,4 +2,6 @@ class UserSerializer
2 2
   include JSONAPI::Serializer
3 3
   attributes :email, :username
4 4
   has_many :activities
5
+
6
+  cache_options store: Rails.cache, namespace: 'jsonapi-serializer', expires_in: 1.hour
5 7
 end

Notiek ielāde…
Atcelt
Saglabāt