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

$egMapsGeoJsonCacheTtl seems to have no effect #719

Open
georgjaehnig opened this issue Jan 21, 2023 · 2 comments
Open

$egMapsGeoJsonCacheTtl seems to have no effect #719

georgjaehnig opened this issue Jan 21, 2023 · 2 comments
Labels

Comments

@georgjaehnig
Copy link
Contributor

Setup

  • Maps version: 10.0.0
  • MW version: 1.35.5
  • PHP version: 7.4.32
  • SMW version (if applicable):

Issue

I have set this var for 100 days (I assume it takes seconds)

$egMapsGeoJsonCacheTtl = 8640000;

But when I monitor the entries created in objectcache, they all get created with an expiration time of < 1 day:

> SELECT keyname, exptime  FROM objectcache ORDER BY keyname;

| xpw_dev:Maps\DataAccess\CachingGeocoder:                                      | 2023-01-22 17:37:54 |
| xpw_dev:Maps\DataAccess\CachingGeocoder:Aldi_Leipzig_Hbf_                     | 2023-01-22 17:39:45 |
| xpw_dev:Maps\DataAccess\CachingGeocoder:Alnatura_Leipzig_Hbf_                 | 2023-01-22 17:39:46 |
| xpw_dev:Maps\DataAccess\CachingGeocoder:Bahnhofsplatz_1_Nürnberg_             | 2023-01-22 17:38:18 |
| xpw_dev:Maps\DataAccess\CachingGeocoder:Lidl_Essen_Hauptbahnhof_              | 2023-01-22 17:37:54 |
| xpw_dev:Maps\DataAccess\CachingGeocoder:Lidl_Nürnberg_Bahnhofsplatz_          | 2023-01-22 17:38:18 |
| xpw_dev:Maps\DataAccess\CachingGeocoder:REWE_Frankfurt_Flughafen_             | 2023-01-22 17:38:50 |
| xpw_dev:Maps\DataAccess\CachingGeocoder:Rewe_Willy-Brandt-Platz_4_            | 2023-01-22 17:39:46 |
| xpw_dev:Maps\DataAccess\CachingGeocoder:SPAR_Express_Lieferservice_Frankfurt_ | 2023-01-22 17:38:51 |
| xpw_dev:Maps\DataAccess\CachingGeocoder:dm_Essen_Hauptbahnhof_                | 2023-01-22 17:37:54 |

I'd expect exptime to be somewhen end of April (100 days from now). Did I miss sth?

@JeroenDeDauw
Copy link
Member

Code looks correct:

$this->getMediaWikiSimpleCache( $this->settings['egMapsGeoJsonCacheTtl'] )

https://github.com/JeroenDeDauw/SimpleCache/blob/master/src/Cache/MediaWikiCache.php#L44

Maybe whatever MediaWiki implementation of BagOfStuff is used does not respect the TTL parameter?

@georgjaehnig
Copy link
Contributor Author

Code looks correct:

It is calling newJeroenSimpleCacheFetcher which does not seem to appear anywhere else in the code. (Don't know if that's relevant.)

Besides, can verify in your objectcache table that the correct exptime is set?

Maybe whatever MediaWiki implementation of BagOfStuff is used does not respect the TTL parameter?

I don't know. How could I find out if 1.35.5 is doing this?

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

No branches or pull requests

2 participants