フォトアルバム

2009年7月

      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

なかのひと

アンケート

  • Do you Like?
    アンケート
    どのColdfusion用フレームワークが好き?
    ModelGlue:Unity
    ModelGLue
    Mach-II
    FuseBox
    LiteWire
    OnTap
    ColdBox
    OnAir
    cfWheels
    CFRails

    [PR]アンログ.jp 自動車保険

373news.com

想ひ出

  • Dvc00050
    携帯で撮った写真をアルバムにしています。

サムネイル

  • CF-OOP









  • ganymean.org









  • シナプス

Google Analytics

« 2005年7月 | メイン | 2005年9月 »

Tartan 1.04 リリース!

Tartan1.04がリリースされました。詳細はこちら

1.unit testsの追加
2.tartan.service.LocalServiceProxy classの追加
    RemoteFlashService と RemoveSoapServiceのベースクラスに!
    tartan.service.RemoteService classは廃止
3.tartan.service.RemoteService classの追加
    MachIIListener classの別機能として追加
4.その他・・・

Model-Glue DTD#2

Model-Glue DTDで紹介したとおり、Model-Glue.xmlもXML DTDに対応する動きとなったことを紹介しましたが、Wayne GrahamがXML SchemaやRelaxNGに対応させる記事をポストしています。
対応するModel-Glueのバーションは0.9となっています。

XML Schema         :こちら
RelaxNG(Full)         :こちら
RelaxNG(Compact) :こちら


 




Model-Glue Viewデータのキャッシング

topica.comのModel-GlueのMLで、'Caching Content in MG'というタイトルでコンテンツのキャッシングに関するスレッドが立った。

解決方法は、ズバリ・・・
ModelGlue.Core.controller.cfc内のGetFromCache

ModelGlue.Util.TimedCache.cfc内のItemNotFound

ModelGlue.Core.controller.cfc内のAddToCache
を使う。つまり、
1.キャッシュしたいコンテンツ<"news">を定義し、
 <cftry>

   <cfset news =GetFromCache("news") />
2.次に、キャッシュの有無をチェックし、
   <cfcatch type="ModelGlue.Util.TimedCache.ItemNotFound">
3.例外が生じた場合、特定の処理を実施し、キャッシュに追加

     something query
     <cfset addToCache("news", news) />

       <cfcache />

  </cftry>

するようだ。

<cffunction name="GetNews" access="Public" returnType="void"
output="false" hint="I am an event handler.">
  <cfargument name="event" type="ModelGlue.Core.Event" required="true">

  <cfset var news = "" />

  <cftry>
    <!--- Try to get it from the cache --->
    <cfset news = getFromCache("news") />
    <!--- If it's not in the cache --->
    <cfcatch type="ModelGlue.Util.TimedCache.ItemNotFound">
      <cfquery datasource="foo" name="news">
        SELECT newsId, title FROM news
      </cfquery>
      <cfset addToCache("news", news) />
    </cfcatch>
  </cftry>

  <cfset arguments.event.setValue("news", news) />
</cffunction>

うーん、やはりModelGlueの内部をもう少し学ぶ必要がありそうだなあー。



 

ログイン

  • コントロールパネルへのログイン
    アカウント:

    パスワード:

PR情報

  • [[PR]]
  • おすすめバナー

更新ブログ

google Search

  • Google
    blog.ganymean.org
    WWW

最近のトラックバック

Google

SHINOBI

Blog powered by TypePad
Member since 04/2005