Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
# along with portalmec. If not, see <http://www.gnu.org/licenses/>. # along with portalmec. If not, see <http://www.gnu.org/licenses/>.
class LearningObjectObaaSerializer < ActiveModel::Serializer 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": { # "educational": {
# "description": "? não existe no PortalMecHomologa" # "description": "? não existe no PortalMecHomologa"
# }, # },
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
# along with portalmec. If not, see <http://www.gnu.org/licenses/>. # along with portalmec. If not, see <http://www.gnu.org/licenses/>.
class LearningObjectSerializer < ActiveModel::Serializer 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 def default_mime_type
object.default_attachment.try(:mime_type) object.default_attachment.try(:mime_type)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment