Environment details
ruby 2.6.2
rails 5.1
carrierwave 2.0
carrierwave-mongoid 1.3
Steps to reproduce
take an object which has a file in s3 and call
offer.offer_pdf.present?
expected result : true, actual_result: true
delete that file from the s3 bucket and call the same method again
offer.offer_pdf.present?
expected result: false, actual_result: true
I suspect the result of the "#present?" is cached and the actual state is not reflected when calling it again. Is there any way to clear this cache so I can get the current status of the file?
(I tried calling #reload on the offer object, but still it did not reflect the actual status of the file)
I raised the same question under fog repo, they feel there should be a way to achieve this using CarrierWave (fog/fog#4029)
Environment details
ruby 2.6.2
rails 5.1
carrierwave 2.0
carrierwave-mongoid 1.3
Steps to reproduce
take an object which has a file in s3 and call
offer.offer_pdf.present?
expected result : true, actual_result: true
delete that file from the s3 bucket and call the same method again
offer.offer_pdf.present?
expected result: false, actual_result: true
I suspect the result of the "#present?" is cached and the actual state is not reflected when calling it again. Is there any way to clear this cache so I can get the current status of the file?
(I tried calling #reload on the offer object, but still it did not reflect the actual status of the file)
I raised the same question under fog repo, they feel there should be a way to achieve this using CarrierWave (fog/fog#4029)