Index: FluentNHibernate/Cfg/Db/PersistenceConfiguration.cs
===================================================================
--- FluentNHibernate/Cfg/Db/PersistenceConfiguration.cs	(revision 439)
+++ FluentNHibernate/Cfg/Db/PersistenceConfiguration.cs	(working copy)
@@ -45,6 +45,9 @@
             _values = new Cache<string, string>(_rawValues, s=>"");
             _values.Store(ConnectionProviderKey, DefaultConnectionProviderClassName);
             connectionString = new TConnectionString();
+
+            // Sets the proxyfactory.factory_class property.
+            ProxyFactoryFactory("NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle");
         }
 
         protected virtual IDictionary<string, string> CreateProperties()
@@ -208,5 +211,76 @@
             _values.Store(AdoNetBatchSizeKey, size.ToString());
             return (TThisConfiguration)this;
         }
+
+        /// <summary>
+        /// Sets the cache.use_query_cache property.
+        /// </summary>
+        /// <returns>Configuration</returns>
+        public TThisConfiguration UseQueryCache()
+        {
+            toggleBooleanSetting(NHibernate.Cfg.Environment.UseQueryCache);
+            return (TThisConfiguration)this;
+        }
+
+	/// <summary>
+        /// Sets the cache.use_query_cache property.
+        /// </summary>
+        /// <returns>Configuration</returns>
+        public TThisConfiguration QueryCacheFactory(string cachefactory)
+        {
+            Raw(NHibernate.Cfg.Environment.QueryCacheFactory, cachefactory);
+            return (TThisConfiguration)this;
+        }
+        
+        /// <summary>
+        /// Sets the cache.use_second_level_cache property.
+        /// </summary>
+        /// <returns>Configuration</returns>
+        public TThisConfiguration UseSecondLevelCache()
+        {
+            toggleBooleanSetting(NHibernate.Cfg.Environment.UseSecondLevelCache);
+            return (TThisConfiguration)this;
+        }
+
+        /// <summary>
+        /// Sets the cache.provider_class property.
+        /// </summary>
+        /// <returns>Configuration</returns>
+        public TThisConfiguration CacheProvider(string provider)
+        {
+            Raw(NHibernate.Cfg.Environment.CacheProvider, provider);
+            return (TThisConfiguration)this;
+        }
+
+        /// <summary>
+        /// Sets the current_session_context_class property.
+        /// </summary>
+        /// <returns>Configuration</returns>
+        public TThisConfiguration SessionContextClass(string sessionContextClass)
+        {
+            Raw(NHibernate.Cfg.Environment.CurrentSessionContextClass, sessionContextClass);
+            return (TThisConfiguration)this;
+        }
+
+        /// <summary>
+        /// Sets the session_factory_name property.
+        /// </summary>
+        /// <param name="name">SessionFactory name</param>
+        /// <returns>Configuration</returns>
+        public TThisConfiguration SessionFactoryName(string name)
+        {
+            Raw(NHibernate.Cfg.Environment.SessionFactoryName, name);
+            return (TThisConfiguration)this;
+        }
+        
+        /// <summary>
+        /// Sets the cache.use_second_level_cache property.
+        /// </summary>
+        /// <returns>Configuration</returns>
+        public TThisConfiguration GenerateStatistics()
+        {
+            toggleBooleanSetting(NHibernate.Cfg.Environment.GenerateStatistics);
+            return (TThisConfiguration)this;
+        }
     }
 }
\ No newline at end of file
