Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't disable cache #303

Open
eduardomozart opened this issue Jun 20, 2023 · 5 comments
Open

Can't disable cache #303

eduardomozart opened this issue Jun 20, 2023 · 5 comments

Comments

@eduardomozart
Copy link
Contributor

The plugin seems to use a similar logic to DW2PDF to check cache availability, as can be seen in:

// hard work only when no cache available

But there's no button to enable/disable ODT cache functionality and even implementing it I wasn't able to disable it completely (it always download from cache instead of generating a new ODT file each try).

@Klap-in
Copy link
Collaborator

Klap-in commented Jun 21, 2023

The dw2pdf plugin has the config setting usecache to let in the Config Manager select the preference.
This can be copied from that plugin, including translated strings.

@Klap-in
Copy link
Collaborator

Klap-in commented Jun 21, 2023

Indeed, the odt plugin copied a big part of the export function from dw2pdf plugin.

@eduardomozart
Copy link
Contributor Author

eduardomozart commented Jun 21, 2023

Yes, I tried to use that but I was unable to disable the cache, it always downloaded the file from cache instead of regenerating the ODT file, even if usecache is false or using ~~NOCACHE~~ on page (not sure if it's intended to not use cache if ~~NOCACHE~~ is set). Dw2PDF offer an option on it's plugin administration page to set usecache option directly on plugin properties. I attempted to recreate it on ODT plugin and I was able to change it's option value, but even when usecache is false, it's still downloading the cached file instead of generating a new ODT one, but the cache seems to be ignored and the ODT is regenerated when changing the directive 'css_template' of the plug-in.

@Klap-in
Copy link
Collaborator

Klap-in commented Jun 22, 2023

~nocache~ is for DokuWiki to instruct the renderer. So it will not change the caching of the export. I maintain the dw2pdf plugin, so I seen quite a bit of that code. Do you have somewhere a branch with this code? Then I can have a look.

@eduardomozart
Copy link
Contributor Author

I'll recreate my draft adding the odt>usecache directive to ODT plug-in again and send you a PR for us to debug it. I compared it with DW2PDF cache control mechanism that uses a logic similar to usecache from ODT plug-in but I was unable to figure out why DW2PDF cache is disabled when dw2pdf>usecache is disabled on plug-in settings but when disabling odt>usecache it's still downloading ODT file from cache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants