Bug: Movable Type' s MTInclude Tag Caching Broken while Memcached Active

| 130 Comments | No TrackBacks |
Are you using Memcached in combination with Movable Type, and are you using the caching options on one or more of your module or widget templates?  Then have a look at these bug reports (106215106287), as they might affect the performance of your installation quite negatively.

Short summary: if you are using memcached with your Movable Type installation and you configure one or more modules or widgets to make use of caching, no caching actually happens because of a bug in the code.  This bug is present both in Movable Type 4.361 and Movable Type 5.11.  Note that if you are not using memcached, Movable Type will fall back to storing cache data in the database directly and this mechanism is not affected by the bug.

Fortunately, the fix is quite simple: in the file lib/MT/Template/ContextHandlers.pm look for following line

$cache_driver->replace( $cache_key, Encode::encode( $enc, $ret ),           

and replace it with

$cache_driver->set( $cache_key, Encode::encode( $enc, $ret ),

On a Movable Type 5 installation, this is all you need to do.  Six Apart is aware of the bug and the fix will probably be in one of the next releases, so if you don't feel comfortable editing source coude just wait for one of the next releases.  A fix has been applied to Melody as well, which will be out shortly.

Note that on Movable Type 4 a second bug is present which will prevent memcached from being used when including cached modules/widgets in some cases, even when the fix above is applied.  Movable Type 4 uses the name of the included module or widget in the cache key used to store the data in memcached.  But such keys cannot contain spaces, so if the module/widget has a space in the name, caching will also fail.  You can work around this bug by renaming the widgets/modules that use caching, making sure their names don't have spaces in them anymore.  Don't forget to also change the names in the <mt:include> tags used to include them in other templates.

How to verify this bug is present on your own installation:

On a Movable Type installation configured to use memcached, create a template module called 'Test'.  Put a single <mt:date> tag in it.  Configure the module to be cached for half an hour (or longer).


Next, create an index template that includes this 'Test' module and preview it.  The result should be the current date and time.

Wait for a few minutes, and preview the template again.  What should happen is that you get the same date/time as before but instead you get the current date and time, proving the module wasn't cached.

Now disable memcached by commenting out the lines about it in your mt-config.cgi file, and repeat the steps above.  You will notice that you will now keep getting the same date and time when you preview the template a few minutes apart.

So what are your options?
  • If the bug affects you and you need a solution:
    • Apply the fix (and make sure cached modules/widgets have names without spaces in them if you are on MT4) : this will get rid of the bug.
    • If not comfortable with editing source code, disabling memcached works too.  This may make rebuilding faster if you are using a lot of cached modules, but it will be at the cost of making the backend interface of MT, searching and/or commenting slower.
  • If the bug doesn't affect you or you don't care:
    • Simply wait for the fix to turn up in a next release of Movable Type/Melody

No TrackBacks

TrackBack URL: https://www.movabletips.com/cgi-bin/mt/mt-tb.cgi/1763


Why can't Version 4 cached modules have spaces in their names? (for MTInclude caching)

Is there a MT bug report I can refer to?

㱰㹓漠桯眧猠瑨慴⁅湨慮捥浥湴⁓桡浡渠偲楯物瑹⁓祳瑥洠睯牫楮朠潵琠景爠祯甿⁄偓⁳瑩汬潴⁷桥牥⁩琠潵杨琠瑯⁢政⁎潴⁡汬 Abercrombie France 映畳⁡牥⁣畴畴⁦潲⁴桥•灲楯物瑹∠獹獴敭⸠䱯潫Ⱐ䤧洠湯琠獡祩湧⁴桡琠浹⁅湨慮捥浥湴⁓桡浡渠副瑡瑩潮⁍慣牯猠睩汬慫攠祯甠畢敲敥琬⁢畴⁩琠睩汬⁰潳楴楶敬礠敬敶慴攠祯甠晲潭⁴桥⁢潴瑯洮⁍慹扥⁩琧猠瑩浥⁴漠杩癥⁩琠愠瑲礮⁍慹扥⁹潵❶攠慣瑵慬汹慳瑥牥搠瑨攠灲楯物瑹⁳祳瑥洮 捨敥爠⽢潷 獡汵瑥 桩杨⁦楶攠⽣潮晥瑴椠⽴桥⁷慶攼⽰㸍㱢爾㱰㹌整♲獱畯㭳⁢攠桯湥獴⸠周攠䕮桡湣敭敮琠卨慭慮⁩猠乏吠慮⁥慳礠捬慳猠瑯⁰污礮⁉渠晡捴Ⱐ楴⁩猠潮攠潦⁴桥潳琠摩晦楣畬琮⁔桥⁰物潲楴礠捡獴楮朠獹獴敭慹

's security guard post inside and out,hogan hogan outlet outl abercrombie france et, and asked the duty officer must memorize the license plate number and the use of people,abercrombie france, and be release hogan outlet d. Many netizens joked that the district offices that should be "the most privileged leadership team,hogan outlet," a; origina

's con louboutin struction safety emergency meeting,louboutin, the meeting of th air jordan pas cher e "8 30" Lancey Terminal template collapse,air jordan pas cher, "8 30" Hailin demolition collapse accidents,abercrombie, "9 2" Yellow River Park e abercrombie xpansion project templates collapse situation and the provincial Office of Housing

's largest full-rotatab abercrombie pas cher le radio louboutin pas cher telescope at the Shanghai Observatory officially completed. The overall performance of the radio telescope in Asia, ranked fourth in the world,abercromb abercrombie pas cher ie pas cher, capable of observing more than 100 million light-years away celestial bodies. It is understood that the

's vice c air jordan hairman,air jordan, t hogan o buy their own shares Foshan Lighting has always been not only buy to sell,hogan, has insisted on holding,abercrombie, not insider abercrombie trading short-term speculation. And he has been there to take Foshan Lighting bonus money to buy company stock habit over the years of thi

'daughter,abercrombie pas cher, there are 11 abercrombie pas cher sets of the fitness room officials'" to track Beijing News (Reporte louboutin pas cher r hole Pu) yesterday,louboutin pas cher, the People's Daily,louboutin pas cher, the official micro-Bo said, Zhengzhou,ray ban pas cher, Henan the Erqi Housing Authority (housing security louboutin pas cher s

issued Tianjin own jobs retired athletes economi air jordan c remedies notice" spirit o ray ban pas cher f the document, go through the formalities placed their own jobs, and receive the appropriate financial compe abercrombie paris nsation. Four years later,air jordan, they are the Tianjin Sports Bureau proposed to return to work and restore wage

's real estate market opinions" clearly stipulates that opinion, N abercrombie france anjing temporarily restrict the purchase of third ho hollister mes; simultaneously cancel improve the type of owner-occupied housing subsidies; apply for pre-sale permit must be declared value, declared three months shal ray ban l not be raised. This is

's Japanese development team People hav mulberry sale e more than 15,000 people,mulberry sale, including more than 5,000 air jordan pas cher people died because of hunger and cold streams illness. Founder County approved by the state at the local establishment "Founder region the Japanese cemetery,air abercrombie france jordan pas cher," these bones bu

's visit to Europe: to further enhance mutual hogan outlet trust,hogan outlet, e abercrombie pas cher xpand pragmatic cooperation and friendship between China news agency, Brussels, September 19 (Reporters Zhang Weiran and Chen Chen) - Local 19 evening louboutin pas cher 7:25 Xu, Chinese Premier Wen Jiabao's special plane arrived in Brussels smooth Abb

's world situation is undergoing major changes,holl hollister ister, international forces undergoing pr abercrombie ofound changes. Realize national rejuvenation,abercrombie, in modern times aspiration of the Chinese people fought, the peaceful ray ban development of cross-strait relations should be the great rejuvenation of the i

Huang Jiwei tha hogan t people on the "People's Daily" use " Silk", "aromatic body" so surprised,ho mulberry outlet gan, because people have of the "People's Daily" has an inherent "ima mulberry outlet uk ge attributes", such as rigorous, authoritative and so on.

November 3, "People's Daily" published eighteen special "stimulate Chin

Meanwhile,ray ban, in the main production areas candy ray ban orange established 16 candy orange associations,mul mulberry outlet uk berry outlet uk, the development of demonstration households 120 orange candy,louboutin, candy orange cultivation training technicians louboutin 400 people,abercrombie, training of farmers two thousand pas

People out of question papers "@ Mr. Huang Guo", but als mulberry outlet o their own micro-blog posted on score four princip louboutin les: 1. Fluency, whether they have the ability to come up with a lot of ideas; 2. Flexibility, whether the type of ideas

So,mulberry outlet, how to s air jordan core this question

rich; 3.

18 members around the urbanization planning,louboutin, urbanizati louboutin on, indu louboutin pas cher stry support, factors of production support and improve the quality of urbanization, human issues such as urbanization,louboutin pas cher abercrombie france , made an oral statement.

Relevant special committees of the CPPCC, democratic par

's Procurator abercrombie pas cher ate for prosecution. YIN Qun-hui,abercrombie pas cher, male,mulberry outlet uk, b mulberry outlet uk orn in November 1958,hollister france, the former Department of Zhuzhou Municipal People's Government Office hollister france of the deputy party secretary, deputy Secretary-General and Office of Zhuzhou City financial secu

's current highway toll for the first three main problems are: excessive charg hollister france es mulberry outlet uk (84.8%),hollister france, loan repayment period after the expiry of the toll road toll continues (70.3%),mulberry outlet uk, toll stations set up too close (66.7%). Other issues include: lack of supervi abercrombie sion fee funds, m

's provincial and municipal level, 70% of the county land and resources to achieve the government information online public.

's air jordan pas cher requirements,air jordan pas abercrombie pas cher cher, the formation stage opinions. Involved in housing construction inspector an expert committee of experts told repo louboutin pas cher rters that from the second quarter is expected to show prices will rise, policy tightening in the second quarter,abercrombie pas cher, the latter will

2 Beijin hogan g West to Hankou Z77 mulberry sale / 8 times Beijing West to Xian Z53 / 4 times Beijing West Hengy hollister france ang K185 / 6 times Beijing west to west Beijing Xinyang K749/50 times Handan D4527 / 8 second interval train from Beijing to Qinhuangdao D4531 / 2

The end result of the opening of the Beijing-Guangzho

(Seven) deepen reform,hogan, improve the legal system.

Pharmaceutical companies to carry out credit rating,barbour jacke barbour jacket t, for serious violations, dishonesty implement industry banned.

Strengthen human resources, technology and investment suppo parajumpers rt for the medical industry structure ad

expression,hollister. "

Text / re hollister porter Tao Lobs abercrombie ter

Text / reporter intern Zhao Tao Lobster exhibition expert interpretation diplomacy sometimes needs "accidental" rese barbour sale archer Yangcheng Xu China Institute of International Studies,abercrombie, said Japanese Foreign Minister Maehara is

prevent fog and haze on the adverse effects of transport,parajumpers.

In parajumpers addition,hollister uk, dry air,mu hollister uk lberry sale, fire weather rating high,barbour outlet, the need to strengthen Yewaiyonghuo and fireworks discharge management,hollister, fire prevention work.

airports,piumini mon mulberry sale c

The Chinese governm parajumpers outlet ent attach hollister es great importance to relations Ecuador,parajumpers outlet.

Ecuador Ecuadorian government is willing to comprehensively promote b hollister outlet ilateral cooperation in various fields between the two countries and the common concern in the international and regional affai

But the reporter was informed that,h hollister outlet ollister outlet, Rongcheng Di parajumpers strict 2012 general budget expenditures reached 874 million yuan.

Master release this year,parajumpers, aged 66,mulberry outlet, four years ago,paraju mulberry outlet mpers pas cher, had surgery due to cancer.

's orphanage,mulberry sale,

Chinese government has alway abercrombie s attached great importance to nuclear safety, construct mulberry outlet ion and operation of nuclear power has always adhere to the "safety first" principle, in order to ensure China's nuclear power safe, secure and orderly de hollister uk velopment.

China believes that the international commu

Residen piumini moncler ts complete health recor abercrombie ds, hypertension, diabetes, severe mental illness and other health care reform and standardize management tasks.

Shaanxi, Jiangsu, Zhejiang, Hubei,piumini mulberry outlet moncler, Shanxi and other provinces started the county public hospital reform.

Beijing part of the

He sa hogan id: "We hope the two sid barbour sale es to seize the current beneficial North-South momentum,hogan, as soon as possible to resolve the Southe barbour uk rn Kordofan and Blue Nile states to reach a comprehensive solution,barbour sale, perform the" Comprehensive Peace Agreement "." For the leaders of North and South Suda

Reporter: Environmental Instit piumini moncler ute for Beijing to do research

hollister uk

Comes to students, he said, "she is more like being a teacher, the newborn is always first class international financial personally barbour jacket taught me."

Chen Yulu: Yes, and now every year we want to do 20 practical things for the s

Q: Copenhagen has yielded results,barbour, but there are still some differe barbour nces,abercro abercrombie mbie, do you think the next step in the negotiations and international cooperation towards what

China unswervingly take the road of sustainable develo barbour sale pment,barbour sale, willing to work with the int

next door on the rest of the "dangerous",parajumpers outlet, a people do not dar parajumpers outlet e to go home to continue to live.

"Now where dare go barbour outlet home to live " Yang Shengjun said his 80-year-old mother and wife at the dinner table was also injured by flying rocks,barbour outlet, but not serious,piumini piumini moncler

His trip is to be invited Shih Hsin Un mulberry outlet iversity in Taiwan to attend th hollister e cross-strait symposium how to respond to the financial crisis, will deliver a keynote speech.

In addition, the former vice chairman of the NPC,mulberry outle hogan outlet t, China Red Cross Society president Peng Cloud, Beijing Palace

To eliminate concerns, p parajumpers outlet roactive reporting of data as required. "" has been stress moncler outlet ed that the Ministry of Housing data acquisition adhere to safety first, and to implement the system use, maintenance, management, real-name system, in order to appease the local informatio barbour uk n security concerns, but loca

abercrombie Comprehensive reform made positive progress.

Greater efforts t hogan o promote the development of qualified personnel.

Earnestly implement the national macro-economic policies in order to improv hogan outlet e the quality and efficiency of economic growth as the center, firmly grasp the strategic basis f

violence or accident hazards, risk their life i hollister uk s in danger, barbour lethal guard security maintenance objects is limited,hollister uk, not all deaths due to perform specialized services by key issue ten million Weizhu gold.

can receive nearly barbour jacket one million Weizhu gold.

If because "the object d

China is ready to work with the Vietnamese side one, cherish, care and developme parajumpers nt of Sino-Vietnam comprehensive strategic cooperative part abercrombie nership,parajumpers, enhance political mutual trust, deepen pragmatic cooperation, properly handle the problems in bilateral relations, jointly improve the abil hogan i

Help Legal loopho parajumpers les in the case of (mainly focusing on t abercrombie hose who accepted bribes striking surface),parajumpers, the developer of avoidance strategy likely to succeed, through bribery di hollister france stortions distorts policy, so that the non-market transactions divorced normal channels.

133 respondents d

'an District Public Secur UGG ブーツ ity Bureau of Economic Investigation Detachment report,UGG ブーツ.

speed behavior,barbour jacket, before the design has n barbour jacket ot taken into account the impact o barbour f snow on the high-speed rail

with the Pearl River Delta,barbour, Hunan,barbour uk, Hubei passenger travel offers great convenience.

Snowfall on high-speed rail in the barbour uk case of deceleration is not

Conditions should be strictly selected g hollister roup of cadres, improve the quality selected, do a good job training before abercrombie pas cher Tibet cadres, strengthen management and assessment, to help solve practical problems, give full play to the role of group of cadres, cadres and improve the level of parajumpers outlet aid work.


killing three people four people were injured, piumini moncler piumini moncler.

At barbour uk present,barbour uk, the injured have been rushed to hospital for treatment, the specific reasons for the accident is under further investigation.

After the accident,hollister outl hollister outlet et, Xiuwen fire quickly dispatched a re

Reporte hollister d that the Chinese anti-Japanese demonstrations last month,hollist abercrombie pas cher er, there are Japanese cars were attacked.

In late August,abercrombie pas cher, Sony was opened in Guang hollister france zhou area of ​​2000 square meters of the world's largest direct sales stores.

Since the Chinese anti-Japane

Bashi Channel, northeastern South China Sea have 6 to 7, a wind gust 8.

On parajumpers outlet the 14th, 08 am to 08 pm on the 15th, northern Heilongjiang, Xinjiang, southwestern,abercrombie, southeastern Qinghai, southwestern Tibet and other places there are small to moderate sn hollister outlet ow or sleet, which, southwester

Aspect Comments: Overnight, quality water becomes dirt parajumpers y,hollister, so fast speed confusing,barbo hollister ur, nothing,hollister uk, it is ridiculous.

(Original title: Luohe Li River polluted water overnight to clear the government to buy good quality water drainage system to flush out p barbour o

Currently, high-speed patrol de hollister uk tachment wi barbour sale llow ditch patrol unit is investigating the cause of the accident.

Reporter then learned from the Yuzhong County Hosp mulberry sale ital, received a distress call immediately after the deployment of a number of hospitals in Yuzhong County, the 120 emergency vehicl

Yang Jiechi agreed with Morjane,barbour sale, Tunisia sides should barbour sale make joint efforts to maintain exchanges and dialogue and consultatio parajumpers outlet ns at all levels,parajumpers outlet, consolidate political mutual trust; innovative ideas,barbour pas cher, and actively explore new areas of bilateral barbour pas cher economic and

Source: Orienta hollister l TV turn "News Network" Berdymukhamedov warmly congratulated China succes mulberry outlet sfully held the opening ceremony of the Shanghai World Expo.

Second, complementary advantages, hollister outlet deepen energy cooperation,hollister, develop long-term, stable and mutually beneficial energy cooperation be

ruling, I hope the Chines mulberry outlet e government and Chinese law can be dealt with leniently for me. "" custody,mulb parajumpers outlet erry outlet, your related rights are safeguarded "" In the detention center, discipline is good to me. Chinese judicial authorities will prosecute hollister and try me,

Your associated rights ""

Leave a comment