Cache package

Hi

How can I enforce octopus deploy to always download and use package instead from cache? Even though the release shows the latest version, octopus still taking the package from cache. I’ve to clean all release, build info and restart octopus service so as to take the latest package. Please advise.

Hi @endashaw.adane!

Thanks for reaching out - this can be achieved by using a project variable Octopus.Deployment.ForcePackageDownload set to True. This will force the reaquisition of the package, regardless of if it exists on the target already. For this, any a slew of other variables, please be sure to take a look at the System variables - Octopus Deploy page in our documentation.

I hope this helps!

Hi @Justin_Walsh

Sorry I may be confused. Setting the project variable is enough or should I need to call it in a step?

Regards,

Just setting it in as a project variable should be enough! That will force the package acquisition steps in the process to always download the package.

@Justin_Walsh

Thanks! appreciated your help!

Regards,

1 Like

@Justin_Walsh

I did as you explained but still octopus using from cache. Attached the variable setting and deployment screen.


Thanks for getting back to me, @endashaw.adane and sorry to hear that this did not go as planned.

The first thing that comes to mind here is if a new release was made after setting the variable on the project? As the variables are snapshotted on a release, you will need to create a new release to incorporate that value, if you haven’t.

Please let me know if this resolves it for you, or if you’re still seeing this after creating a new release, and we can dig in further.

Hi @Justin_Walsh

I’m actually doing like that. package is created after variable is configured. I cleaned all release, build information and try to create a new release, but still cached the old one. Is there a way to clean the cache

That’s no problem @endashaw.adane! Just one of those simple things that can sometimes slip people’s minds when making changes.

That’s very strange that it used the file in the cache on the target. To manually clear the cache, you can navigate to the Files directory in the Octopus home directory on the deployment target (Usually C:\Octopus\Files for a default install), and you should see your packages there. If you delete Vosco.Ums.Web.Setup@.... it should push out the new package on the next deployment.

I’ll do some digging on my side to ensure that that setting is working as expected as well.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.