diff --git a/CHANGES.txt b/CHANGES.txt
index 8d05981..6240712 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,8 +1,21 @@
 unreleased
 ==========
 
+Backward Incompatibilities
+--------------------------
+
 - Drop Python 3.2 support.
 
+- Use the original service context interface as the cache key instead
+  of the current context. This means the service will be properly created
+  only once for any context satisfying the original interface.
+
+  Previously, if you requested the same service from 2 different contexts
+  in the same request you would receive 2 service objects, instead of
+  a cached version of the original service, assuming the service was
+  registered to satisfy both contexts.
+  See https://github.com/mmerickel/pyramid_services/pull/12
+
 0.3 (2015-12-13)
 ================
 
diff --git a/pyramid_services/__init__.py b/pyramid_services/__init__.py
index 9b80908..197e94a 100644
--- a/pyramid_services/__init__.py
+++ b/pyramid_services/__init__.py
@@ -25,6 +25,11 @@ def includeme(config):
     config.add_directive('register_service_factory', register_service_factory)
     config.add_directive('find_service_factory', find_service_factory)
 
+class ServiceInfo(object):
+    def __init__(self, factory, context_iface):
+        self.factory = factory
+        self.context_iface = context_iface
+
 class SingletonServiceWrapper(object):
     def __init__(self, service):
         self.service = service
@@ -64,13 +69,15 @@ def register_service_factory(
     else:
         context_iface = context
 
+    info = ServiceInfo(service_factory, context_iface)
+
     def register():
         adapters = config.registry.adapters
         adapters.register(
             (IServiceClassifier, context_iface),
             iface,
             name,
-            service_factory,
+            info,
         )
 
     discriminator = ('service factories', (iface, context, name))
@@ -101,11 +108,16 @@ def find_service(request, iface=Interface, context=_marker, name=''):
     svc = cache.lookup(svc_types, iface, name=name, default=None)
     if svc is None:
         adapters = request.registry.adapters
-        svc_factory = adapters.lookup(svc_types, iface, name=name)
-        if svc_factory is None:
+        info = adapters.lookup(svc_types, iface, name=name)
+        if info is None:
             raise ValueError('could not find registered service')
-        svc = svc_factory(context, request)
-        cache.register(svc_types, iface, name, svc)
+        svc = info.factory(context, request)
+        cache.register(
+            (IServiceClassifier, info.context_iface),
+            iface,
+            name,
+            svc,
+        )
     return svc
 
 def find_service_factory(
@@ -118,7 +130,7 @@ def find_service_factory(
     svc_types = (IServiceClassifier, context_iface)
 
     adapters = config_or_request.registry.adapters
-    svc_factory = adapters.lookup(svc_types, iface, name=name)
-    if svc_factory is None:
+    info = adapters.lookup(svc_types, iface, name=name)
+    if info is None:
         raise ValueError('could not find registered service')
-    return svc_factory
+    return info.factory

Singleton per request object
One issue I ran into with your **dbsession** service example (that uses a service factory) is the following:

When looking for the service different sessions are returned depending on the context. This is by design. Citing the documentation:

> The factory will be used at most once per request/context/name combination.

Having different DB session in one request is quite ugly and I can think of no use case for it. How did I end up with different contexts? By using the *request* object outside a view function invoked directly with *pyramid.threadlocal.get_current_request* . In that case the context is None.

This example by [Jon Rosebaugh - What the Zope Transaction Manager Means To Me (and you)](https://metaclassical.com/what-the-zope-transaction-manager-means-to-me-and-you/) would work but I wanted to use *pyramid_services* (for consistency, because I'm already using it in other parts of the application).

I'm aware that this might not be the place for this since it classifies more as a question than an issue, but you could at least fix the example to be more clear that

```python
request.find_service(name='db')
```

will return different sessions depending on the request context.

My workaround is to always pass context=None:

```python
request.find_service(name='db', context=None)
```

Is there a simpler solution (e.g. a singleton per request)? *register_service()* would register a singleton object for the whole application, but I do want a different DB session for every request.
diff --git a/pyramid_services/tests/test_it.py b/pyramid_services/tests/test_it.py
index 1e482a3..5abeec3 100644
--- a/pyramid_services/tests/test_it.py
+++ b/pyramid_services/tests/test_it.py
@@ -256,6 +256,25 @@ class TestIntegration_register_service_factory(unittest.TestCase):
         self.assertEqual(resp.body, b'foo')
         self.assertEqual(called, [True])
 
+    def test_context_does_not_affect_cache(self):
+        config = self.config
+
+        config.register_service_factory(
+            lambda ctx, req: DummyService('foo'), name='foo')
+
+        def dummy_view(context, request):
+            s1 = request.find_service(name='foo', context=Root())
+            s2 = request.find_service(name='foo', context=Leaf())
+            self.assertTrue(s1 is s2)
+            return s1.result
+
+        config.add_view(dummy_view, renderer='string')
+
+        app = self._makeApp()
+        resp = app.get('/')
+        self.assertEqual(resp.body, b'foo')
+
+
 class TestIntegration_find_service_factory(unittest.TestCase):
     def setUp(self):
         self.config = pyramid.testing.setUp()
@@ -305,12 +324,12 @@ class DummyService(object):
 
 class DummyServiceFactory(object):
     def __init__(self, result):
-        self.result = DummyService(result)
+        self.result = result
 
     def __call__(self, context, request):
         self.context = context
         self.request = request
-        return self.result
+        return DummyService(self.result)
 
 class DummyView(object):
     def __init__(self, *a, **kw):
@@ -318,5 +337,5 @@ class DummyView(object):
         self.kw = kw
 
     def __call__(self, request):
-        svc = request.find_service(*self.a, **self.kw)
-        return svc()
+        self.svc = request.find_service(*self.a, **self.kw)
+        return self.svc()

pip install -e .[testing]
parse_log_pytest
pytest
pytest
3.5
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work
beautifulsoup4==4.12.3
certifi==2021.5.30
coverage==6.2
hupper==1.10.3
importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1631916693255/work
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work
nose==1.3.7
packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work
PasteDeploy==2.1.1
plaster==1.0
plaster-pastedeploy==0.7
pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work
py @ file:///opt/conda/conda-bld/py_1644396412707/work
pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work
pyramid==2.0.2
-e git+https://github.com/mmerickel/pyramid_services.git@85f423102ec14195698b1e44b12fccf30650679d#egg=pyramid_services
pytest==6.2.4
soupsieve==2.3.2.post1
toml @ file:///tmp/build/80754af9/toml_1616166611790/work
translationstring==1.4
typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work
venusian==3.0.0
waitress==2.0.0
WebOb==1.8.9
WebTest==3.0.0
zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work
zope.deprecation==4.4.0
zope.interface==5.5.2

name: pyramid_services
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - attrs=21.4.0=pyhd3eb1b0_0
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - importlib-metadata=4.8.1=py36h06a4308_0
  - importlib_metadata=4.8.1=hd3eb1b0_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - more-itertools=8.12.0=pyhd3eb1b0_0
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - packaging=21.3=pyhd3eb1b0_0
  - pip=21.2.2=py36h06a4308_0
  - pluggy=0.13.1=py36h06a4308_0
  - py=1.11.0=pyhd3eb1b0_0
  - pyparsing=3.0.4=pyhd3eb1b0_0
  - pytest=6.2.4=py36h06a4308_2
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - toml=0.10.2=pyhd3eb1b0_0
  - typing_extensions=4.1.1=pyh06a4308_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zipp=3.6.0=pyhd3eb1b0_0
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - beautifulsoup4==4.12.3
      - coverage==6.2
      - hupper==1.10.3
      - nose==1.3.7
      - pastedeploy==2.1.1
      - plaster==1.0
      - plaster-pastedeploy==0.7
      - pyramid==2.0.2
      - soupsieve==2.3.2.post1
      - translationstring==1.4
      - venusian==3.0.0
      - waitress==2.0.0
      - webob==1.8.9
      - webtest==3.0.0
      - zope-deprecation==4.4.0
      - zope-interface==5.5.2
prefix: /opt/conda/envs/pyramid_services

pyramid_services/tests/test_it.py::TestIntegration_register_service_factory::test_context_does_not_affect_cache
pyramid_services/tests/test_it.py::TestIntegration_register_service::test_context_sensitive pyramid_services/tests/test_it.py::TestIntegration_register_service::test_iface pyramid_services/tests/test_it.py::TestIntegration_register_service::test_introspectable pyramid_services/tests/test_it.py::TestIntegration_register_service::test_name pyramid_services/tests/test_it.py::TestIntegration_register_service_factory::test_context_sensitive pyramid_services/tests/test_it.py::TestIntegration_register_service_factory::test_iface pyramid_services/tests/test_it.py::TestIntegration_register_service_factory::test_introspectable pyramid_services/tests/test_it.py::TestIntegration_register_service_factory::test_name pyramid_services/tests/test_it.py::TestIntegration_register_service_factory::test_with_no_context pyramid_services/tests/test_it.py::TestIntegration_find_service_factory::test_find_service_factory pyramid_services/tests/test_it.py::TestIntegration_find_service_factory::test_find_service_factory_fail pyramid_services/tests/test_it.py::TestIntegration_find_service_factory::test_find_service_factory_service
CHANGES.txt pyramid_services/__init__.py
CHANGES.txt pyramid_services/__init__.py