Module:CountryData/cacheU: Difference between revisions
Appearance
Content deleted Content added
Add loadData-compatible modules to cache the content of the most-used country data |
Put the redirects all on the summary cache. *** existing text overwritten *** |
||
Line 1: | Line 1: | ||
local CountryData = require('Module:CountryData') |
local CountryData = require('Module:CountryData') |
||
local |
local pages = {'U.S. Virgin Islands', 'UNESCO', 'Uganda', 'Ukraine', 'Ukrainian Soviet Socialist Republic', 'Union of South Africa', 'United Arab Emirates', 'United Arab Republic', 'United Kingdom of Great Britain and Ireland', 'United Kingdom', 'United Nations', 'United States Army', 'United States Federal Government', 'United States Marine Corps', 'United States Navy', 'United States military', 'United States', 'Upper Volta', 'Uruguay', 'Utah', 'Uzbekistan'} |
||
local pages = {'United States Federal Government', 'Uzbekistan', 'Utah', 'United Arab Emirates', 'Union of South Africa', 'United Kingdom', 'United Kingdom of Great Britain and Ireland', 'Uganda', 'United States military', 'United States Army', 'Upper Volta', 'United States Marine Corps', 'United Nations', 'Ukrainian Soviet Socialist Republic', 'U.S. Virgin Islands', 'United Arab Republic', 'UNESCO', 'Ukraine', 'United States Navy', 'United States', 'Uruguay'} |
|||
local p = { |
local p = { |
||
redirects = redirects, |
|||
data = {} |
data = {} |
||
} |
} |
Revision as of 20:20, 3 May 2021
local CountryData = require('Module:CountryData')
local pages = {'U.S. Virgin Islands', 'UNESCO', 'Uganda', 'Ukraine', 'Ukrainian Soviet Socialist Republic', 'Union of South Africa', 'United Arab Emirates', 'United Arab Republic', 'United Kingdom of Great Britain and Ireland', 'United Kingdom', 'United Nations', 'United States Army', 'United States Federal Government', 'United States Marine Corps', 'United States Navy', 'United States military', 'United States', 'Upper Volta', 'Uruguay', 'Utah', 'Uzbekistan'}
local p = {
data = {}
}
local frame = mw.getCurrentFrame()
for _,v in ipairs(pages) do
p.data[v] = CountryData.gettable(frame, v, {})
end
return p