diff --git a/rackspace/lb/v1/lbs/fixtures.go b/rackspace/lb/v1/lbs/fixtures.go
index 5f30ec5..2c26d2c 100644
--- a/rackspace/lb/v1/lbs/fixtures.go
+++ b/rackspace/lb/v1/lbs/fixtures.go
@@ -510,3 +510,55 @@
 			`)
 	})
 }
+
+func mockGetCachingResponse(t *testing.T, id int) {
+	th.Mux.HandleFunc("/loadbalancers/"+strconv.Itoa(id)+"/contentcaching", func(w http.ResponseWriter, r *http.Request) {
+		th.TestMethod(t, r, "GET")
+		th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
+
+		w.Header().Add("Content-Type", "application/json")
+		w.WriteHeader(http.StatusOK)
+
+		fmt.Fprintf(w, `
+{
+   "contentCaching": {
+      "enabled": true
+   }
+}
+			`)
+	})
+}
+
+func mockEnableCachingResponse(t *testing.T, id int) {
+	th.Mux.HandleFunc("/loadbalancers/"+strconv.Itoa(id)+"/contentcaching", func(w http.ResponseWriter, r *http.Request) {
+		th.TestMethod(t, r, "PUT")
+		th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
+
+		th.TestJSONRequest(t, r, `
+{
+   "contentCaching":{
+      "enabled":true
+   }
+}
+		`)
+
+		w.WriteHeader(http.StatusOK)
+	})
+}
+
+func mockDisableCachingResponse(t *testing.T, id int) {
+	th.Mux.HandleFunc("/loadbalancers/"+strconv.Itoa(id)+"/contentcaching", func(w http.ResponseWriter, r *http.Request) {
+		th.TestMethod(t, r, "PUT")
+		th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
+
+		th.TestJSONRequest(t, r, `
+{
+	"contentCaching":{
+			"enabled":false
+	}
+}
+		`)
+
+		w.WriteHeader(http.StatusOK)
+	})
+}
diff --git a/rackspace/lb/v1/lbs/requests.go b/rackspace/lb/v1/lbs/requests.go
index 81e7fdc..2d80062 100644
--- a/rackspace/lb/v1/lbs/requests.go
+++ b/rackspace/lb/v1/lbs/requests.go
@@ -421,7 +421,7 @@
 
 func toConnLoggingMap(state bool) map[string]map[string]bool {
 	return map[string]map[string]bool{
-		"connectionLogging": map[string]bool{"enabled": false},
+		"connectionLogging": map[string]bool{"enabled": state},
 	}
 }
 
@@ -430,7 +430,7 @@
 	reqBody := toConnLoggingMap(true)
 	var res gophercloud.ErrResult
 
-	_, res.Err = perigee.Request("GET", loggingURL(client, id), perigee.Options{
+	_, res.Err = perigee.Request("PUT", loggingURL(client, id), perigee.Options{
 		MoreHeaders: client.AuthenticatedHeaders(),
 		ReqBody:     &reqBody,
 		OkCodes:     []int{200},
@@ -444,7 +444,7 @@
 	reqBody := toConnLoggingMap(false)
 	var res gophercloud.ErrResult
 
-	_, res.Err = perigee.Request("GET", loggingURL(client, id), perigee.Options{
+	_, res.Err = perigee.Request("PUT", loggingURL(client, id), perigee.Options{
 		MoreHeaders: client.AuthenticatedHeaders(),
 		ReqBody:     &reqBody,
 		OkCodes:     []int{200},
@@ -508,3 +508,57 @@
 
 	return res
 }
+
+func IsContentCached(client *gophercloud.ServiceClient, id int) (bool, error) {
+	var body interface{}
+
+	_, err := perigee.Request("GET", cacheURL(client, id), perigee.Options{
+		MoreHeaders: client.AuthenticatedHeaders(),
+		Results:     &body,
+		OkCodes:     []int{200},
+	})
+	if err != nil {
+		return false, err
+	}
+
+	var resp struct {
+		CC struct {
+			Enabled bool `mapstructure:"enabled"`
+		} `mapstructure:"contentCaching"`
+	}
+
+	err = mapstructure.Decode(body, &resp)
+	return resp.CC.Enabled, err
+}
+
+func toCachingMap(state bool) map[string]map[string]bool {
+	return map[string]map[string]bool{
+		"contentCaching": map[string]bool{"enabled": state},
+	}
+}
+
+func EnableCaching(client *gophercloud.ServiceClient, id int) gophercloud.ErrResult {
+	reqBody := toCachingMap(true)
+	var res gophercloud.ErrResult
+
+	_, res.Err = perigee.Request("PUT", cacheURL(client, id), perigee.Options{
+		MoreHeaders: client.AuthenticatedHeaders(),
+		ReqBody:     &reqBody,
+		OkCodes:     []int{200},
+	})
+
+	return res
+}
+
+func DisableCaching(client *gophercloud.ServiceClient, id int) gophercloud.ErrResult {
+	reqBody := toCachingMap(false)
+	var res gophercloud.ErrResult
+
+	_, res.Err = perigee.Request("PUT", cacheURL(client, id), perigee.Options{
+		MoreHeaders: client.AuthenticatedHeaders(),
+		ReqBody:     &reqBody,
+		OkCodes:     []int{200},
+	})
+
+	return res
+}
diff --git a/rackspace/lb/v1/lbs/requests_test.go b/rackspace/lb/v1/lbs/requests_test.go
index 59b18e4..32af5c3 100644
--- a/rackspace/lb/v1/lbs/requests_test.go
+++ b/rackspace/lb/v1/lbs/requests_test.go
@@ -298,6 +298,26 @@
 	th.AssertEquals(t, true, res)
 }
 
+func TestEnablingLogging(t *testing.T) {
+	th.SetupHTTP()
+	defer th.TeardownHTTP()
+
+	mockEnableLoggingResponse(t, id1)
+
+	err := EnableLogging(client.ServiceClient(), id1).ExtractErr()
+	th.AssertNoErr(t, err)
+}
+
+func TestDisablingLogging(t *testing.T) {
+	th.SetupHTTP()
+	defer th.TeardownHTTP()
+
+	mockDisableLoggingResponse(t, id1)
+
+	err := DisableLogging(client.ServiceClient(), id1).ExtractErr()
+	th.AssertNoErr(t, err)
+}
+
 func TestGetErrorPage(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
@@ -362,3 +382,34 @@
 	}
 	th.AssertDeepEquals(t, expected, content)
 }
+
+func TestIsCached(t *testing.T) {
+	th.SetupHTTP()
+	defer th.TeardownHTTP()
+
+	mockGetCachingResponse(t, id1)
+
+	res, err := IsContentCached(client.ServiceClient(), id1)
+	th.AssertNoErr(t, err)
+	th.AssertEquals(t, true, res)
+}
+
+func TestEnablingCaching(t *testing.T) {
+	th.SetupHTTP()
+	defer th.TeardownHTTP()
+
+	mockEnableCachingResponse(t, id1)
+
+	err := EnableCaching(client.ServiceClient(), id1).ExtractErr()
+	th.AssertNoErr(t, err)
+}
+
+func TestDisablingCaching(t *testing.T) {
+	th.SetupHTTP()
+	defer th.TeardownHTTP()
+
+	mockDisableCachingResponse(t, id1)
+
+	err := DisableCaching(client.ServiceClient(), id1).ExtractErr()
+	th.AssertNoErr(t, err)
+}
diff --git a/rackspace/lb/v1/lbs/urls.go b/rackspace/lb/v1/lbs/urls.go
index f647073..471a86b 100644
--- a/rackspace/lb/v1/lbs/urls.go
+++ b/rackspace/lb/v1/lbs/urls.go
@@ -13,6 +13,7 @@
 	logPath        = "connectionlogging"
 	epPath         = "errorpage"
 	stPath         = "stats"
+	cachePath      = "contentcaching"
 )
 
 func resourceURL(c *gophercloud.ServiceClient, id int) string {
@@ -42,3 +43,7 @@
 func statsURL(c *gophercloud.ServiceClient, id int) string {
 	return c.ServiceURL(path, strconv.Itoa(id), stPath)
 }
+
+func cacheURL(c *gophercloud.ServiceClient, id int) string {
+	return c.ServiceURL(path, strconv.Itoa(id), cachePath)
+}
