media file: memoize expensive methods in subclasses.

This commit is contained in:
evazion
2020-05-27 14:31:39 -05:00
parent 84cd8540ab
commit f94c52478c
5 changed files with 7 additions and 4 deletions

View File

@@ -31,5 +31,5 @@ class MediaFile::Video < MediaFile
MediaFile.open(vp.path)
end
memoize :video, :preview_frame
memoize :video, :preview_frame, :dimensions, :duration, :has_audio?
end