Don't cache github libraries above nginx server.

It's too expensive to fetch the timestamps when the github
server is busy.  See Dick Hollenbeck's comments at the top of
github_plugin.cpp for more info.

Also adds some safety to the other caching algorithms after
seeing github_plugin's wild-west usage of the kicad_plugin.

Fixes: lp:1753143
* https://bugs.launchpad.net/kicad/+bug/1753143
This commit is contained in:
Jeff Young
2018-03-04 01:16:59 +00:00
parent 43147a3a7a
commit 284c346828
13 changed files with 44 additions and 18 deletions
+2 -2
View File
@@ -241,7 +241,7 @@ long long FP_LIB_TABLE::GenerateTimestamp( const wxString* aNickname )
{
const FP_LIB_TABLE_ROW* row = FindRow( *aNickname );
wxASSERT( (PLUGIN*) row->plugin );
return row->plugin->GetLibraryTimestamp();
return row->plugin->GetLibraryTimestamp( row->GetFullURI( true ) );
}
long long hash = 0;
@@ -250,7 +250,7 @@ long long FP_LIB_TABLE::GenerateTimestamp( const wxString* aNickname )
{
const FP_LIB_TABLE_ROW* row = FindRow( nickname );
wxASSERT( (PLUGIN*) row->plugin );
hash += row->plugin->GetLibraryTimestamp();
hash += row->plugin->GetLibraryTimestamp( row->GetFullURI( true ) );
}
return hash;