Commit d9738d71 authored by Israel Barreto Sant'Anna's avatar Israel Barreto Sant'Anna
Browse files

Remove views and downloads count from serializar cache

parent c3ecf7f4
......@@ -18,7 +18,7 @@
# along with portalmec. If not, see <http://www.gnu.org/licenses/>.
class LearningObjectObaaSerializer < ActiveModel::Serializer
cache key: 'learning_object_obaa', expires_in: 4.hours
cache key: 'learning_object_obaa', expires_in: 4.hours, except: [:likes_count, :views_count, :downloads_count]
# "educational": {
# "description": "? não existe no PortalMecHomologa"
# },
......
......@@ -18,7 +18,7 @@
# along with portalmec. If not, see <http://www.gnu.org/licenses/>.
class LearningObjectSerializer < ActiveModel::Serializer
cache key: 'learning_object', expires_in: 4.hours, except: [:likes_count, :liked, :reviewed, :complained]
cache key: 'learning_object', expires_in: 4.hours, except: [:likes_count, :liked, :reviewed, :complained, :views_count, :downloads_count]
def default_mime_type
object.default_attachment.try(:mime_type)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment